您的位置:首页 > 运维架构 > Linux

mysql在linux下的安装

2017-01-25 18:28 302 查看
1、下载

    下载地址:http://dev.mysql.com/downloads/mysql/5.6.html#downloads

    下载版本:我这里选择的5.6.33,通用版,linux下64位

    也可以直接复制64位的下载地址,通过命令下载:wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

2、解压

3、添加用户组和用户

4、安装

5、错误

  5.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;

  5.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

6、其他

  6.1 配置环境变量

    vi + /etc/profile

    export PATH=....:/usr/local/mysql/bin
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: