sudo yum localinstallmysql-community-release-el6-*.noarch.rpm
这个Yum库包含了MySQLServer,MySQL工作台管理工具以及ODBC驱动,现在可以通过下面的命令简单地安装MySQLServer:
sudo yum install mysql-community-server
至此我就可以使用Yum简单地管理MySQL更新,并能确保总是从官网软件库得到最新的发布版。
附录:
1、root password update failed
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement.
解决办法:
[**@localhost ~]# mysql
mysql>set global read_only=0
Query OK, 0 rows affected (0.00 sec)
mysql>flush privileges
Query OK, 0 rows affected (0.00 sec)
mysql>quit
[**@localhost ~]# /usr/bin/mysql_secure_installation
如此便可以重新更新root密码了!
2、[ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
解决办法:进入你的mysql数据存放目录,删除ibdata1文件即可,例如在我的环境下
#cd /var/lib/mysql
#mv ibdata1 ibdata1.bak
3、[ERROR] InnoDB: space header page consists of zero bytes in data file ./ibdata1
解决办法:修改配置文件my.cnf
根据个人环境空间大小和需求调节如下参数的值
innodb_buffer_pool_size = 256M
innodb_log_file_size= 256M
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
添加一条:
innodb_flush_method=normal
4、ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
解决办法:Google上有很多,我遇到这个情况的时候只是使用/usr/bin/mysql_secure_installation 重新设置一次。
linux下使用yum安装mysql1. 安装mysql 服务器端:
yum install mysql-server
yum install mysql-devel
2. 安装mysql客户端:
yum install mysql
3. 启动mysql服务:
service mysqld start或者/etc/init.d/mysqld start
停止:
service mysqld stop
重启:
service mysqld restart
4. 创建root管理员:
mysqladmin -u root password 123456
5.登陆
mysql -uroot -p123456
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)