3、添加用户组和用户
添加用户组:groupadd mysql
添加用户mysql 到用户组mysql:useradd -g mysql mysql
4、安装
因为我们是编译安装需要生成configure文件需要下载编译工具
yum install autoconf -y
安装时的一些错误
-bash: ./scripts/mysql_install_db: /usr/bin/perl: bad interpreter: 没有那个文件或目录
解决: yum -y install perl perl-devel
Installing MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
解决:yum -y install libaio-devel
10.#启动mysql
service mysqld start
关闭mysql
service mysqld stop
查看运行状态
service mysqld status
11、远程连接错误
11.1 sqlyog连接时,报1130错误,是由于没有给远程连接的用户权限问题
解决1:更改 ‘mysql’数据库‘user’表‘host’项,从‘localhost’改成‘%’。
use mysql;
select 'host' from user where user='root';
update user set host = '%' where user ='root';
flush privileges;
解决2:直接授权
GRANT ALL PRIVILEGES ON *.* TO ‘root’@'%’ IDENTIFIED BY ‘youpassword’ WITH GRANT OPTION;
11.2 安装时的一些错误
-bash: ./scripts/mysql_install_db: /usr/bin/perl: bad interpreter: 没有那个文件或目录
解决: yum -y install perl perl-devel
Installing MySQL system tables…/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
解决:yum -y install libaio-devel
12、其他
配置环境变量
vi /etc/profile
export PATH=....:/usr/local/mysql/bin
————————————————