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

构建MySQL服务器的安装步骤

[日期:2013-03-11] 来源:Linux社区  作者:Linux [字体:大 中 小]

5、初始化数据库

 


[root@localhost MySQL-5.0.56]# /usr/local/mysql/bin/mysql_install_db --user=mysql

 


The latest information about MySQL is available on the web at

http://www.mysql.com

Please consult the MySQL manual section: 'Problems running mysql_install_db',

and the manual section that describes problems on your OS.

Another information source is the MySQL email archive.

Please check all of the above before mailing us!

And if you do mail us, you MUST use the /usr/local/mysql/bin/mysqlbug script!

 


[root@localhost mysql-5.0.56]# chown -R root.mysql /usr/local/mysql/

[root@localhost mysql-5.0.56]# chown -R mysql /usr/local/mysql/var/

 


6、调整lib库路径

 


[root@localhost mysql-5.0.56]# echo "/usr/local/mysql/lib/mysql/" >> /etc/ld.so.conf

[root@localhost mysql-5.0.56]# ldconfig

 


7、使用mysqld_safe脚本安全启动服务

 

 

[root@localhost mysql-5.0.56]# /usr/local/mysql/bin/mysqld_safe --user=mysql &

[2] 7657

 

 

 

8、将mysqld 添加为系统服务

 


[root@localhost mysql-5.0.56]# cp support-files/mysql.server /etc/init.d/mysqld

[root@localhost mysql-5.0.56]# chmod +x /etc/init.d/mysqld

[root@localhost mysql-5.0.56]# chkconfig --add mysqld

[root@localhost mysql-5.0.56]# chkconfig mysqld on

 


9、设置Mysql的执行路径

 


[root@localhost mysql-5.0.56]# export PATH=$PATH:/usr/local/mysql/bin/

[root@localhost mysql-5.0.56]# echo "PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile

 


10、安装完成、登陆测试

 


[root@localhost mysql-5.0.56]# mysql -u root

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.0.56-log Source distribution

 


Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

 


mysql>

linux
相关资讯       Mysql服务器安装  mysql安装步骤 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

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