您的位置:时时app平台注册网站 > 时时app平台注册网站 > CentOS6.5和RedHat6.5下以rpm方式安装mysql-5.6.20

CentOS6.5和RedHat6.5下以rpm方式安装mysql-5.6.20

2019-12-06 12:28

六、登陆到mysql,第二次装没有密码,直接回车

  

在/var/lib/mysql/目录下删掉那三个文本:ibdata1 ib_logfile0 ib_logfile1 然后重启mysql

2014-01-21 06:03:29 14964 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2014-01-21 06:03:29 14964 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2014-01-21 06:03:29 14964 [ERROR] Plugin 'InnoDB' init function returned error.
2014-01-21 06:03:29 14964 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-01-21 06:03:29 14964 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-01-21 06:03:29 14964 [ERROR] Aborting
[root@localhost local]# mysql -uroot -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
方法操作很简单,如下:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
//把空的用户密码都修改成非空的密码。
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root' and host='root' or host='localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit # /etc/init.d/mysqld restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
rpm -qa | grep -i mysql
#如果安装了先卸载旧的版本 
yum -y remove mysql...

那句话必要您再一次设置一回密码!

五、初叶化MySQL及安装密码

八、设置开机自运营

A、大概境遇的失实(风华正茂)

  

  

三、开首逐生龙活虎安装

chkconfig mysql on
chkconfig --list | grep mysql
mysql> show databases;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

转自:

rpm -ivh MySQL-server-5.6.20-1.el6.x86_64.rpm
rpm -ivh MySQL-devel-5.6.20-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.6.20-1.el6.x86_64.rpm
cp /usr/share/mysql/my-default.cnf /etc/my.cnf
vi /etc/my.cnf

  

  

mysql> use mysql;
mysql> select host,user,password from user;
mysql> update user set host='%' where user='root' and host='localhost';
mysql> flush privileges;
mysql> exit;

  

意气风发、检查下linux是还是不是风姿浪漫度安装了MySQL

  

  

cd /var/lib/mysql
rm ibdata1 ib_logfile0 ib_logfile1
service mysql start

 

#做如下配置

/usr/bin/mysql_install_db
service mysql start

  

四、修正配置文件地点并做连锁设置

二、下载供给的安装包,下载地址:

七、设置允许远程登入

/var/lib/mysql/ #数据库目录
/usr/share/mysql #配置文件目录
/usr/bin #相关命令目录
/etc/init.d/mysql #启动脚本 注:卸载mysql的时候,将这些目录下的文件也删掉。
mysql -uroot -p
#设置root用户的密码
mysql> update user set password=password('123456') where user='root';

C、大概碰着的荒谬(三)

[client]
password = 123456
port = 3306
default-character-set=utf8
[mysqld]
port = 3306
character_set_server=utf8
character_set_client=utf8
collation-server=utf8_general_ci
#linux下mysql安装完后是默认:表名区分大小写,列名不区分大小写; 0:区分大小写,1:不区分大小写
lower_case_table_names=1
#设置最大连接数,默认为 151,MySQL服务器允许的最大连接数16384
max_connections=1000
[mysql]
default-character-set = utf8
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.03 sec)
mysql> create database roger;
Query OK, 1 row affected (0.00 sec)

B、大概境遇的失实(二)

https://dev.mysql.com/downloads/mysql/5.6.html#downloads

九、MySQL的默许安装地点表明

本文由时时app平台注册网站发布于时时app平台注册网站,转载请注明出处:CentOS6.5和RedHat6.5下以rpm方式安装mysql-5.6.20

关键词: