<
>

Centos5.5中安装Mysql5.5过程分享

2019-01-05 10:01:29 来源:易采站长站 作者:于丽


FATAL ERROR: Could not find./bin/my_print_defaults
If you compiled from source, you need torun 'make install' to
copy the software into the correct locationready for operation.
If you are using a binary release, you musteither be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

解决方法:


[root@local ~]# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data

再启动mysql


[root@local ~]# /usr/local/mysql/bin/mysqld_safe --user=mysql

注册mysql服务,开机自动启动

1.设置mysql配置文件到/etc目录


[root@local ~]# cp /usr/local/mysql/support-files/my-medium.cnf/etc/my.cnf 

2.设置mysql开机自启


[root@local ~]# cp/usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
[root@local ~]# chmod +x /etc/init.d/mysql
[root@local ~]# /sbin/chkconfig --add mysql

3.启动mysql服务


[root@local ~]# service mysql start 

测试mysql是否安装成功


[root@local ~]# /usr/local/mysql/bin/mysql -u root -p 
Enter password:  
Welcome to the MySQL monitor.  Commands end with ; or g. 
Your MySQL connection id is 1 
Server version: 5.5.37 Source distribution 
  
Copyright (c) 2000, 2014, Oracle and/or itsaffiliates. All rights reserved. 
  
Oracle is a registered trademark of OracleCorporation and/or its 
affiliates. Other names may be trademarksof their respective 
owners. 
  
Type 'help;' or 'h' for help. Type 'c' toclear the current input statement. 
  
mysql> show databases; 
+--------------------+ 
| Database           | 
+--------------------+ 
| information_schema | 
| mysql              | 
| performance_schema | 
| test               | 
+--------------------+ 
4 rows in set (0.03 sec) 

您可能感兴趣的文章:

Mysql5.5安装配置方法及中文乱码的快速解决方法centos6.7安装mysql5.5.48的方法centos 7安装mysql5.5和安装 mariadb使用的命令centos 7安装mysql5.5的方法Windows下安装MySQL5.5.19图文教程Windows XP系统安装MySQL5.5.28图解教程Win7系统安装MySQL5.5.21图解教程MySql 5.5.29绿色安装教程详解
暂时禁止评论

微信扫一扫

易采站长站微信账号