redhat下安装mysql server不知道怎么办啦

redhat下安装mysql server不知道怎么办啦
当前问题共有如下(1)个解决方案
  • 跆拳一身lxs
    跆拳一身lxs
    mysql安装:
    [root@lamp ~]# yum install mysql mysql-server mysql-devel
    启动mysql服务:/etc/init.d/mysqld start
    设置mysql密码:
    直接使用”mysql”进入数据库模式,
    mysql> USE mysql;
    mysql> UPDATE user SET Password=PASSWORD(‘newpassword’) WHERE user=’root';
    mysql> FLUSH PRIVILEGES;
    登陆
    mysql -u root -p
    Enter Password:
    创建一个用户管理数据库
    mysql > create database demo
    mysql >GRANT ALL PRIVILEGES ON demo.* TO ‘guest’@’localhost’ IDENTIFIED BY ‘guest’ WITH GRANT OPTION;
    mysql> UPDATE user SET Password=PASSWORD(‘guest’) WHERE user=’guest';
    设置MySQL字符集,vi /etc/my.cnf
    #MySQL字符集
    default-character-set = utf8
    character_set_server = utf8
    [client]
    default-character-set=utf8
    参考:http://www.leixuesong.cn/76
上一篇:php中有mysqli类,是吗?$mysqli->info
下一篇:apache+php+mysql 本地运行完美 放到linux服务器就出问题