加入收藏 | 设为首页 | 会员中心 | 我要投稿 西安站长网 (https://www.029zz.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 建站 > 正文

MySQL数据库入门多实例配置

发布时间:2019-10-15 02:17:08 所属栏目:建站 来源:民工哥技术之路
导读:副标题#e# 前面介绍了相关的基础命令操作:MySQL数据库基础篇之入门基础命令 所有的操作都是基于单实例的,mysql多实例在实际生产环境也是非常实用的,因为必须要掌握。 1、什么是多实例 多实例就是一台服务器上开启多个不同的服务端口(默认3306),运行多

多实例初始化操作

  1. [root@centos6 3306]# /application/mysql/scripts/mysql_install_db --basedir=/application/mysql --datadir=/data/3306/data --user=mysql  
  2. Installing MySQL system tables...  
  3. 161209 18:02:17 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.  
  4. 161209 18:02:17 [Note] /application/mysql/bin/mysqld (mysqld 5.5.52-log) starting as process 3336 ...  
  5. OK  
  6. Filling help tables...  
  7. 161209 18:02:17 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.  
  8. 161209 18:02:17 [Note] /application/mysql/bin/mysqld (mysqld 5.5.52-log) starting as process 3343 ...  
  9. OK  
  10. To start mysqld at boot time you have to copy  
  11. support-files/mysql.server to the right place for your system  
  12. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !  
  13. To do so, start the server, then issue the following commands:  
  14. /application/mysql/bin/mysqladmin -u root password 'new-password'  
  15. /application/mysql/bin/mysqladmin -u root -h centos6 password 'new-password'  
  16. Alternatively you can run:  
  17. /application/mysql/bin/mysql_secure_installation  
  18. which will also give you the option of removing the test  
  19. databases and anonymous user created by default.  This is  
  20. strongly recommended for production servers.  
  21. See the manual for more instructions.  
  22. You can start the MySQL daemon with:  
  23. cd /application/mysql ; /application/mysql/bin/mysqld_safe &  
  24. You can test the MySQL daemon with mysql-test-run.pl  
  25. cd /application/mysql/mysql-test ; perl mysql-test-run.pl  
  26. Please report any problems at http://bugs.mysql.com/ 

(编辑:西安站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读