m6米乐安卓版下载-米乐app官网下载

centos7.x mysql8.x的源码安装 -m6米乐安卓版下载

jieguo 2022-08-03
547

1、下载和解压包

wget
安装目录:/home/mysql/
tar -xvjf mysql-8.0.30-linux-glibc2.12-x86_64.tar.xz
mv mysql-8.0.30-linux-glibc2.12-x86_64 mysql
cd /home/mysql
mkdir data

[root@radiuso mysql]# ll
total 1058460
drwxr-xr-x. 2 root root 6 jun 27 14:21 data
drwxr-xr-x. 9 root root 129 jun 27 14:21 mysql

用户和组:groupadd mysql
useradd -g mysql mysql
[root@radiuso mysql]# groupadd mysql
[root@radiuso mysql]# useradd -g mysql mysql

目录权限:chown -r mysql.mysql /home/mysql/
chmod -r 755 /home/mysql/
[root@radiuso mysql]# chown -r mysql.mysql /home/mysql/
[root@radiuso mysql]# chmod -r 755 /home/mysql/
[root@radiuso mysql]# ll
total 1058460
drwxr-xr-x. 2 mysql mysql 6 jun 27 14:21 data
drwxr-xr-x. 9 mysql mysql 129 jun 27 14:21 mysql
-rwxr-xr-x. 1 mysql mysql 1084018688 jun 27 12:18 mysql-8.0.30-linux-glibc2.12-x86_64.tar

2、配置文件

vi /etc/my.cnf
[client]
port=3307
socket=/home/mysql/mysql.sock
[mysqld]
port=3307
user=mysql
socket=/home/mysql/mysql.sock
basedir=/home/mysql/mysql
datadir=/home/mysql/data
lower-case-table-names=1
default_authentication_plugin=mysql_native_password
#skip-grant-tables
#innodb_buffer_pool_size=105109258240
innodb_buffer_pool_size=100g

:wq

3、初始化

bin/mysqld --defaults-file=/etc/my.cnf --initialize --user=mysql --lower-case-table-names=1 --basedir=/home/mysql/mysql --datadir=/home/mysql/data

[root@radiuso bin]# ./mysqld --defaults-file=/etc/my.cnf --initialize --user=mysql --lower-case-table-names=1 --basedir=/home/mysql/mysql --datadir=/home/mysql/data
2022-06-27t06:40:47.158585z 0 [system] [my-013169] [server] /home/mysql/mysql/bin/mysqld (mysqld 8.0.30) initializing of server in progress as process 39435
2022-06-27t06:40:47.167144z 1 [system] [my-013576] [innodb] innodb initialization has started.
2022-06-27t06:40:48.067547z 1 [system] [my-013577] [innodb] innodb initialization has ended.
2022-06-27t06:40:50.193057z 6 [note] [my-010454] [server] a temporary password is generated for root@localhost: =u:fwuuot8ds

4、启动

cp /home/mysql/support-files/mysql.server /etc/init.d/mysql
systemctl start mysql
[root@radiusp bin]# mysql -u root -p
enter password:
error 1862 (hy000): your password has expired. to log in you must change it using a client that supports expired passwords.
vi /etc/my.cnf
[mysqld]
skip-grant-tables
[root@radiusp bin]# service mysql stop
shutting down mysql… [ ok ]
[root@radiusp bin]# service mysql start
starting mysql. [ ok ]
[root@radiusp bin]# mysql -u root -p
enter password:
welcome to the mariadb monitor. commands end with ; or \g.
your mysql connection id is 7
server version: 8.0.30 mysql community server - gpl

米乐app官网下载 copyright © 2000, 2017, oracle, mariadb corporation ab and others.

type ‘help;’ or ‘\h’ for help. type ‘\c’ to clear the current input statement.

mysql [(none)]> use mysql;
reading table information for completion of table and column names
you can turn off this feature to get a quicker startup with -a

database changed
mysql [mysql]> select * from mysql.user where user=‘root’ \g
*************************** 1. row ***************************
host: localhost
user: root
select_priv: y
insert_priv: y
update_priv: y
delete_priv: y
create_priv: y
drop_priv: y
reload_priv: y
shutdown_priv: y
process_priv: y
file_priv: y
grant_priv: y
references_priv: y
index_priv: y
alter_priv: y
show_db_priv: y
super_priv: y
create_tmp_table_priv: y
lock_tables_priv: y
execute_priv: y
repl_slave_priv: y
repl_client_priv: y
create_view_priv: y
show_view_priv: y
create_routine_priv: y
alter_routine_priv: y
create_user_priv: y
event_priv: y
trigger_priv: y
create_tablespace_priv: y
ssl_type:
ssl_cipher:
x509_issuer:
x509_subject:
max_questions: 0
max_updates: 0
max_connections: 0
max_user_connections: 0
plugin: mysql_native_password
authentication_string: *4fec5bad03efd5a8fc5cd68197b9cc859354753f
password_expired: y
password_last_changed: 2022-06-27 15:50:00
password_lifetime: null
account_locked: n
create_role_priv: y
drop_role_priv: y
password_reuse_history: null
password_reuse_time: null
password_require_current: null
user_attributes: null
1 row in set (0.00 sec)

设置成不过期
mysql [mysql]> update user set password_expired=‘n’ where user=‘root’;
query ok, 1 row affected (0.00 sec)
rows matched: 1 changed: 1 warnings: 0

mysql [mysql]> flush privileges;
query ok, 0 rows affected (0.00 sec)

mysql [mysql]> quit

vi /etc/my.cnf
[mysqld]
#skip-grant-tables //设置密码不过期后注释掉
重启服务

问题:

修改密码:
alter user ‘root’@’localhost’ identified by ‘xxxx’;

错误:error 2059 (hy000): authentication plugin ‘caching_sha2_password’ cannot be loaded: /usrb64/mysqlugin/caching_sha2_password.so: cannot open shared object file: no such file or directory

vi /etc/my.cnf

default_authentication_plugin=mysql_native_password
:wq
重启服务

最后修改时间:2022-08-03 11:14:29
「喜欢文章,快来给作者赞赏墨值吧」
【米乐app官网下载的版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

网站地图