时间:2021-07-01 10:21:17 帮助过:2人阅读
mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz
groupadd mysql
useradd -r -g mysql mysql
cd/usr/local/
tar zxvf mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz
ln -s mysql-5.6.12-linux-glibc2.5-x86_64 mysql
cd mysql
chown -R mysql .
chgrp -R mysql
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
cp support-files/my-medium.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --list mysqld
service mysqld start
远程无法连接的问题
进入到bin目录:
./mysql -u root -p
输入密码
然后执行:use mysql
授权:GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘36.34.90.248‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION;
linux下安装mysql数据库
标签: