CentOS 中安装mysql5
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-05-14
t mysql 4096 Oct 21 2006 share drwxr-xr-x 5 root mysql 4096 Oct 21 2006 sql-bench drwxr-xr-x 2 root mysql 4096 Oct 21 2006 support-files drwxr-xr-x 2 root mysql 4096 Oct 21 2006 tests 七、初始化mysql #/usr/local/mysql/scripts/mysql_install_db --user=mysql 出现如下提示表示,初始化mysql正确. Installing all prepared tables Fill help tables 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 ! To do so, start the server, then issue the following commands: ./bin/mysqladmin -u root password ''new-password'' ./bin/mysqladmin -u root -h localhost.localdomain password ''new-password'' See the manual for more instructions. You can start the MySQL daemon with: cd . ; ./bin/mysqld_safe & You can test the MySQL daemon with the benchmarks in the ''sql-bench'' directory: cd sql-bench ; perl run-all-tests Please report any problems with the ./bin/mysqlbug script! The latest information about MySQL is available on the web at [url]http://www.mysql.com[/url] Support MySQL by buying support/licenses at [url]http://shop.mysql.com[/url] 权限列表(注意与上面的权限列表对比) [root@localhost mysql]# ll total 160 drwxr-xr-x 2 root mysql 4096 Oct 21 2006 bin -rwxr-xr-x 1 root mysql 801 Oct 21 2006 configure -rw-r--r-- 1 root mysql 19071 Oct 21 2006 COPYING drwxr-x--- 4 mysql mysql 4096 May 25 20:04 data drwxr-xr-x 2 root mysql 4096 Oct 21 2006 docs -rw-r--r-- 1 root mysql 5806 Oct 21 2006 EXCEPTIONS-CLIENT drwxr-xr-x 3 root mysql 4096 Oct 21 2006 include -rw-r--r-- 1 root mysql 7752 Oct 21 2006 INSTALL-BINARY drwxr-xr-x 2 root mysql 4096 Oct 21 2006 lib drwxr-xr-x 4 root mysql 4096 Oct 21 2006 man drwxr-xr-x 8 root mysql 4096 Oct 21 2006 mysql-test -rw-r--r-- 1 root mysql 1380 Oct 21 2006 README drwxr-xr-x 2 root mysql 4096 Oct 21 2006 scripts drwxr-xr-x 3 root mysql 4096 Oct 21 2006 share drwxr-xr-x 5 root mysql 4096 Oct 21 2006 sql-bench drwxr-xr-x 2 root mysql 4096 Oct 21 2006 support-files drwxr-xr-x 2 root mysql 4096 Oct 21 2006 tests 八、启动mysql # /usr/local/mysql/bin/mysqld_safe --user=mysql & //运行mysql,如果没有问题的话,应该会出现类似这样的提示# Starting mysqld daemon with databases from /usr/local/mysql/var 如果出现 mysql ended这样的语句,表示Mysql没有正常启动,你可以到log中查找问题,Log文件的通常在/etc/my.cnf中配 置,若你为改变log的默认配置的话,报错日志在/usr/local/mysql/data 目录下的,如localhost.localdomain.err ,前面的名字是你在/etc/hosts 中配置的项,这里是这样的名字,说明在/etc/hosts 并未改变.大多数问题是权限设置不正确引起的. 九、设置mysql的管理密码 # /usr/local/mysql/bin/mysqladmin -u root password ''yourpassword'' //默认安装密码为空,为了安全你马上修改. 十、是mysql随OS启动而启动 # cp support-files/mysql.server /etc/rc.d/init.d/mysqld # chmod 700 /etc/init.d/mysqld # chkconfig --add mysqld # chkconfig --level 345 mysqld on 十二、启动mysql # service mysqld start |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: postfix文档修正下一篇: Linux 忘记密码如何登陆—续篇2救援模式
关于CentOS 中安装mysql5的所有评论