2.3.1 linux软件管理 : debian和RedHat体系常用软件安装 : mysql 安装
debian体系
安装命令
sudo apt-get install -y mysql-server
sudo apt-get install -y mysql-client
sudo apt-get install -y libmysqlclient-dev`
配置远程访问异常:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.113' (111)
##需要在my.cnf 一般是 /etc/mysql/my.cnf
##注解掉bind-address = 127.0.0.1
安装提示密码:

RedHat系统
安装命令
$wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
$rpm -ivh mysql57-community-release-el7-8.noarch.rpm
$yum install -y mysql-server
$service mysqld start ##启动服务
$grep "password" /var/log/mysqld.log ##查看密码
$mysql -u root -p
$mysql> SET PASSWORD = PASSWORD('your new password’);##重置密码
允许远程访问
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Ys20140913!' WITH GRANT OPTION;
flush privileges; ##刷新权限
本文详细介绍在Debian和RedHat系统中安装MySQL的过程,并提供配置远程访问的方法及解决常见错误的步骤。
284

被折叠的 条评论
为什么被折叠?



