MySQL + MySQL Front 安装使用

 

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
1.       安装mysql-5.1.50
 # tar –zxvf mysql-5.1.50-linux-i686-glibc23.tar.gz –C /usr/local
 # cd /usr/local
 # ln –sv mysql-5.1.50-linux-i686-glibc23/ mysql
 # groupadd –r mysql    // -r 为系统组
 # useradd –g mysql –s /sbin/nologin –M –r mysql
 # cd /mysql
 # chown mysql:mysql . –R    //注意点
 # mkdir /mysql/data -pv //将mysql的数据保存在该目录下
 # chown mysql:mysql /mysql/data –R
 # scripts/mysql_install_db --user=mysql –datadir=/mysql/data
 # chown –R root .    //注意点
 # chown mysql data –R
 # cp support-files/my-large.cnf /etc/my.cnf
 # vim /etc/my.cnf
   添加一行:datadir = /mysql/data/
   修改:innodb_data_home_dir = /mysql/data/
         innodb_log_group_home_dir = /mysql/data/
 # bin/mysql_safe --user=mysql --datadir=/mysql/data/
 # cp support-files/mysql.server /etc/init.d/mysqld
 # chkconfig --add mysqld
 # chkconfig mysqld on
 # service mysqld start
 # vim /etc/profile
添加:PATH=$PATH:/usr/local/mysql/bin
 # . /etc/profile
 # vim /etc/ld.so.conf.d/mysql.conf
添加: /usr/local/mysql/lib
 # ldconfig [-v]
 # ln –sv /usr/local/mysql/include/ /usr/include/mysql
 # mysql //尝试登录
 # mysqladmin –uroot password ‘123456’   
 # mysql –uroot –p
 Enter password:
 mysql> \q

安装结束后,用MySQL Front 连接MySQL服务器时,可能会出现如下错误:

“SQL执行错误#1130....”这种错误的原因是你没有给其他用户授权。
 

解决办法有两种:

第一种:在服务器端上连接上Mysql;

mysql>GRANT ALL PRIVILEGES ON *.* TO root@'192.168.0.0/255.255.255.0' IDENTIFIED BY '123456';    
mysql>FLUSH PRIVILEGES;
mysql>select User,Host,Password from mysql.user;                
+------+---------------------------+-------------------------------------------+
| user | host                      | password                                  |
+------+---------------------------+-------------------------------------------+
| root | localhost                 | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root | station31.example.com     | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root | 127.0.0.1                 | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| root | 192.168.0.0/255.255.255.0 | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+------+---------------------------+-------------------------------------------+
出现红色字段类似的行,就可以了。接下来,用Mysql Front 登录你的Mysql服务器...

第二种:1.查看Linux防火墙是否关掉;

2.使用MySQL Front再次连接;

3.登录Mysql:

4.首先使用update把mysql.user中的root的host从localhost修改成%:
mysql> UPDATE mysql.user SET Host='%' WHERE Host='localhost' ;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@"%";
mysql> FLUSH PRIVILEGES ;
5.再次连接,显示成功。

 

你可能感兴趣的:(mysql,数据库,休闲,Front,安装笔记)