Home > Database > Mysql Tutorial > body text

在Redhat中装配Mysql

WBOY
Release: 2016-06-07 16:14:58
Original
1142 people have browsed it

在Redhat中安装Mysql 安装时请使用root用户。安装前准备两个rpm包: MySQL-server-5.6.12-1.el6.x86_64.rpm MySQL-client-5.6.12-1.el6.x86_64.rpm 1、安装服务端: 命令:rpm -ivh MySQL-server-5.6.12-1.el6.x86_64.rpm 2、安装客户端 命令:rpm -ivh MySQL

在Redhat中安装Mysql

安装时请使用root用户。安装前准备两个rpm包:

MySQL-server-5.6.12-1.el6.x86_64.rpm

MySQL-client-5.6.12-1.el6.x86_64.rpm

1、安装服务端:

命令:rpm -ivh MySQL-server-5.6.12-1.el6.x86_64.rpm

2、安装客户端

命令:rpm -ivh MySQL-client-5.6.12-1.el6.x86_64.rpm

3、在Redhat中是不能使用空密码登录mysql的,请依次执行以下命令:

su root
?????? service mysql stop
?????? mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
?????? mysql -u root mysql
?????? UPDATE user SET Password=PASSWORD('123456') where USER='root';
?????? FLUSH PRIVILEGES;
?????? quit
?????? exit
?????? ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
?????? service mysql start
??? 执行完毕后,再次登录

mysql -uroot -p123456

4、登录后执行mysql命令时,还会提示设置密码,再次运行以下命令:

SET Password=PASSWORD('123456')

?

?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!