linux下MySQL数据库的安装
1.检测系统自带Mysql,并卸载
[root@hadoop eclipse]# rpm -qa | grep mysqlmysql-libs-5.1.66-2.el6_3.x86_64
[root@hadoop eclipse]# rpm -e mysql-libs-5.1.66-2.el6_3.x86_64 --nodeps
2.通过网络安装MySQL (yum)
yum -y install mysql mysql-devel mysql-server
3.启动服务
# service mysqld start
开机自启动
# chkconfig mysqld on
4.设置用户和密码
#/usr/bin/mysqladmin -uroot password 'root'
5.进入
mysql -uroot -p123456
6.查看mysql用户
select host,user,password from mysql.user;
7.修改远程访问权限
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
8.重载授权表:
FLUSH PRIVILEGES;