平面设计素材网站大全,北京网站建站推,可以做空股票的网站,一个正版ps软件多少钱龙蜥操作系统 Anolis OS 8 是 OpenAnolis 社区推出的完全开源、中立、开放的发行版#xff0c;它支持多计算架构#xff0c;也面向云端场景优化#xff0c;兼容 CentOS 软件生态。Anolis OS 8 旨在为广大开发者和运维人员提供稳定、高性能、安全、可靠、开源的操作系统服务。…龙蜥操作系统 Anolis OS 8 是 OpenAnolis 社区推出的完全开源、中立、开放的发行版它支持多计算架构也面向云端场景优化兼容 CentOS 软件生态。Anolis OS 8 旨在为广大开发者和运维人员提供稳定、高性能、安全、可靠、开源的操作系统服务。 Apache Tomcat官网: Anolis系统中离线安装Tomcat与Linux一致Tomcat下载到本地上传解压运行即可。  
MySql官网 Anolis系统中离线安装MySql数据库与Linux安装方式基本一致。 安装版本mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz    
进入安装流程 
创建目录 
mkdir -p /server/tools
mkdir -p /opt/mysql
mkdir -p /data/mysql/mysql3306/{data,logs}
cd /server/tools #进入到该目录解压安装包 
tar zxf mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz移动到指定目录 
mv mysql-5.7.26-linux-glibc2.12-x86_64  /opt/mysql/mysql-5.7.26创建软连接 
ln -s /opt/mysql/mysql-5.7.26/ /usr/local/mysql编辑配置文件 
vi /data/mysql/mysql3306/my3306.cnf
[client]
usermysql
port 3306
socket /data/mysql/mysql3306/mysql.sock
[mysqld]
port 3306
usermysql
server_id 1
basedir/usr/local/mysql
datadir/data/mysql/mysql3306/data
log_error/data/mysql/mysql3306/logs/error.log
log_bin/data/mysql/mysql3306/logs/mysql-bin
binlog_formatrow
gtid_modeon
enforce_gtid_consistencytrue
log_slave_updates1
max_connections1024
wait_timeout60
sort_buffer_size2M
max_allowed_packet32M
join_buffer_size2M
innodb_buffer_pool_size128M
innodb_flush_log_at_trx_commit1
innodb_log_buffer_size32M
innodb_log_file_size128M
innodb_log_files_in_group2
binlog_cache_size2M
max_binlog_cache_size8M
max_binlog_size512M
expire_logs_days7
slow_query_logon
slow_query_log_file/data/mysql/mysql3306/logs/slow.log
long_query_time0.5
log_queries_not_using_indexes1初始化数据库 
初始化数据库之前如果/data/mysql/mysql3306路径下有data文件夹则需要删除否则初始化失败。 
/usr/local/mysql/bin/mysqld --defaults-file/data/mysql/mysql3306/my3306.cnf --initialize-insecure --usermysql --basedir/usr/local/mysql  --datadir/data/mysql/mysql3306/data加入环境变量 
vim /etc/profile #vim编辑
export PATH/usr/local/mysql/bin:$PATH启动数据库 
mysqld --defaults-file/data/mysql/mysql3306/my3306.cnf 查看是否启动成功 netstat -lntup启动数据库报错 2025-01-13T09:19:04.303142Z 0 [ERROR] Fatal error: Cant open and lock privilege tables: Table mysql.user doesnt exist
2025-01-13T09:19:04.303159Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.解决报错 
vim /etc/my.cnf
datadir/var/lib/mysql/data删除data目录中的内容
rm -rf data  //在mysql安装目录下执行
mkdir data  连接数据库 
因为初始化的时候设置了–initialize-insecure所以登录时不需要密码。 
第一次连接没有密码直接敲回车mysql -u root -p存在问题 
启动数据库时只能使用mysqld --defaults-file/data/mysql/mysql3306/my3306.cnf  不能使用用service mysqld start命令,使用该命令会报如下错误 Starting MySQL.Logging to /usr/local/mysql/data/anolis.err.ERROR! The server quit without updating PID file (/usr/local/mysql/data/anolis.pid).解决办法 
将配置文件移动到mysql的安装目录 修改配置文件中的路径 设置通过命令启动 mv /opt/mysql/mysql-5.7.26/support-files/mysql.server /etc/init.d/mysqld设置用户权限 
# 增加用户和组
[rootanolis ~]# groupadd mysql
[rootanolis ~]# useradd -r -g mysql mysql
# 设置对应的mysql文件权限
# 这里因为/usr/local/mysql/data是创建的/opt/mysql/mysql-5.7.26/的软链接所以两个地址实际上是一个
chown mysql:mysql -R /opt/mysql/mysql-5.7.26/
chmod -R 755 /usr/local/mysql/data初始化数据库 
# 进入mysql安装目录
cd /usr/local/mysql/data
# 删除data
rm -rf data/
# 初始化如果是--initialize的话登录就需要输入密码
./bin/mysqld --defaults-file/usr/local/mysql/my.cnf --initialize-insecure --usermysql
# 初始化完成后可进行启动数据库
[rootanolis mysql]# service mysqld restartERROR! MySQL server PID file could not be found!
Starting MySQL.. SUCCESS! 登录数据库 
[rootanolis mysql]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.26-log MySQL Community Server (GPL)Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type help; or \h for help. Type \c to clear the current input statement.mysql use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
# 设置数据库密码
mysql  update user set authentication_stringpassword(数据库密码) where userroot;
Query OK, 1 row affected, 1 warning (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 1
# 刷新否则可能不生效
mysql flush privileges; 
Query OK, 0 rows affected (0.05 sec)
# 设置数据库远程访问
mysql update user set host% where userroot;
Query OK, 1 row affected (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 0
# 刷新
mysql flush privileges;
Query OK, 0 rows affected (0.00 sec)
# 退出
mysql quit;Bye设置MySQL开机自启 
设置MySQL开机自启可以通过chkconfig命令来实现 
# 添加到管理列表
chkconfig --add mysqld
# 设置开机自启动或者通过chkconfig --level 2345 mysql on命令来指定在运行级2、3、4、5中开启MySQL服务
chkconfig mysqld on
# 查看设置状态
chkconfig --list mysqld
[rootanolis ~]# chkconfig --list mysqld
Note: This output shows SysV services only and does not include nativesystemd services. SysV configuration data might be overridden by nativesystemd configuration.If you want to list systemd services use systemctl list-unit-files.To see services enabled on particular target usesystemctl list-dependencies [target].mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off