你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu 10.10里下载MySQL源码及编译安装

[日期:2012-05-12] 来源:Linux社区  作者:robertaqi [字体:大 中 小]

5其他就是创建链接或者环境变量,实现在终端中,直接执行mysql........

-------------------------------------------------------

(执行内部mysql安装结果)

www.linuxidc.com @www.linuxidc.com:/usr/local/mysql$ sudo scripts/mysql_install_db --user=mysql
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

(要设置开机自启动,请将文件复制到系统正确的地方)
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
(记得给mysql管理员设置密码)
To do so, start the server, then issue the following commands:(设置密码方式1)
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h cheng-laptop password 'new-password'
Alternatively you can run:(或者你可以运行下面这个命令进行密码设置,我用的这个,里面其实不只是设置root密码)
./bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:(运行MySQL daemon,需要cd到当前目录,执行./bin/mysqld_safe &)
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd ./mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!
www.linuxidc.com @www.linuxidc.com-laptop:/usr/local/mysql$ 

------------------------------------------------------------------------------------------------------

其他:

1关于Ubuntu安装版本,官网

这里有*.deb安装包
A:ubuntu是Debain发展来的,应该是可以安装的,至于是Debain 5还是Debain 6,我就说不清了。
B:我的ubuntu 10.10发行的时候,还没有Debain 6,所以我应该是Debain 5。
C:当初尝试的时候,Debain 6,Debain 5我都安装过,安装没有报错,因为在系统菜单中没有发现mysql快捷方式,以为没有安装成功,现在想想应该是安装成功了,只是我没有进行配置,配置一下应该能用。

》》》》》》》还有一个版本应该也可以用:

Linux - Generic 2.6 (x86, 64-bit), Compressed TAR Archive   5.5.20 177.3M
(mysql-5.5.20-linux2.6-x86_64.tar.gz)
这个版本网上有说,其实就是一个通用版本(二进制版本),下载下来不需要安装,配置里面有个配置文件“INSTALL-BINARY”,配置一下就能用了,很简单。

2 常见错误解决:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
刚开始的时候,被这个错误搞晕了,其实就是“连接文件”目录不对应,mysqld.sock是一个连接配置文件
我看了一下我的文件在“/tmp/mysql.sock”
所以用-S指定连接文件就ok了
  ./bin/mysql -u root -S /tmp/mysql.sock -p
linux
相关资讯       MySQL安装教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款