标签:
rpm -qa | grep mysql // 这个命令就会查看该操作系统上是否已经安装了mysql数据库
rpm -e mysql // 普通删除模式
rpm -e –nodeps mysql// 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除
ps:在删除完以后我们可以通过 rpm -qa | grep mysql 命令来查看mysql是否已经卸载成功!!
yum list | grep mysql //查看yum上提供的mysql数据库可下载的版本
yum install -y mysql-server mysql mysql-devel //将mysql mysql-server mysql-devel都安装好
service mysqld start/stop/restart
/usr/bin/mysqladmin -u root password ‘new-password‘ // 为root账号设置密码
vi /etc/my.cnf //编辑mysql的主配置文件。如果没有,去/usr/share/mysql拷贝一份(my-medium.cnf)即可
[client]
default-character-set=utf8
[mysqld]
collation-server = utf8_unicode_ci
init-connect=‘SET NAMES utf8‘
character-set-server=utf8
mysql>SHOW VARIABLES LIKE ‘character%‘;
mysql>show variables like ‘collation%‘;
http://jiony.iteye.com/blog/1672912
http://cnzxp521.iteye.com/blog/1332876
http://freeloda.blog.51cto.com/2033581/1253898
GRANT ALL PRIVILEGES ON . TO ‘root‘@‘192.168.15.115‘ IDENTIFIED BY ‘123‘ WITH GRANT OPTION;//授权
GRANT ALL PRIVILEGES ON . TO ‘root‘@‘192.168.15.%‘ IDENTIFIED BY ‘123‘ WITH GRANT OPTION;//授权
revoke alter on . from ‘root‘@‘192.168.15.115‘ identified by ‘123‘;//取消授权
FLUSH PRIVILEGES; //刷新
yum安装mysql、mysql的编码修改(utf-8)以及Mysql对其它机器访问的IP以及权限限
标签:
原文地址:http://my.oschina.net/hebad/blog/397371