您的位置:首页 > 健康 > 养生 > 开发公司申请办理公共维修资金申请书_深圳最好的网站建设公司_软文网站发布平台_网络广告营销案例

开发公司申请办理公共维修资金申请书_深圳最好的网站建设公司_软文网站发布平台_网络广告营销案例

2025/2/24 11:38:59 来源:https://blog.csdn.net/weixin_49200545/article/details/145780411  浏览:    关键词:开发公司申请办理公共维修资金申请书_深圳最好的网站建设公司_软文网站发布平台_网络广告营销案例
开发公司申请办理公共维修资金申请书_深圳最好的网站建设公司_软文网站发布平台_网络广告营销案例

一:安装Liunx(CentOS-6-x86_64)

安装Liunx(CentOS-6-x86_64)

二:下载MySql(5.6.50)

MySql下载官网
在这里插入图片描述

二:安装MySql

2.1 将mysql上传到Liunx

文件地址 /usr/local/

在这里插入图片描述

2.2 解压安装MySql
cd /usr/local/
tar zxvf mysql-5.6.50-linux-glibc2.12-x86_64.tar.gz -C /usr/local

在这里插入图片描述

2.3 修改解压后包的名称(方便后续的使用)

在这里插入图片描述

2.4 配置my.cnf文件的文件
vim /etc/my.cnf

my.cnf文件内容全部替换成下面的

[mysqld]
# 设置3306端口
port=3306
# 设置mysql的安装目录
basedir=/usr/local/mysql
# 设置mysql数据库的数据的存放目录
datadir=/usr/local/mysql/data
# 允许最大连接数
max_connections=200
# 允许连接失败的次数。
max_connect_errors=10
# 服务端使用的字符集默认为utf8mb4
character-set-server=utf8mb4
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
#mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8mb4
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8mb4
2.4 创建MySQL用户组
groupadd mysql创建MySQL用户组
useradd -r -g mysql mysql添加MySQL用户并添加到MySQL用户组
chown mysql:mysql -R /usr/local/mysql/data/赋予权限
2.5 将 MySQL 的 bin 目录添加到 PATH
export PATH=/usr/local/mysql/bin:$PATH
source ~/.bashrc
2.6 将初始化 MySQL
cd /usr/local/mysql/scripts/
./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
初始化成功的打印内容,其中打印内容中会有初始密码记得保存记录
里面的打印的初始密码/usr/local/mysql/bin/mysqladmin -u root password 'new-password'/usr/local/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Installing MySQL system tables...2025-02-21 16:51:26 0 [Warning] TIMESTAMP with implicit DEFAULT va                                                                 lue is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation fo                                                                 r more details).
2025-02-21 16:51:26 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstra                                                                 p.
2025-02-21 16:51:26 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.50) starting as process 31405                                                                  ...
2025-02-21 16:51:26 31405 [Note] InnoDB: Using atomics to ref count buffer pool pages
2025-02-21 16:51:26 31405 [Note] InnoDB: The InnoDB memory heap is disabled
2025-02-21 16:51:26 31405 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2025-02-21 16:51:26 31405 [Note] InnoDB: Memory barrier is not used
2025-02-21 16:51:26 31405 [Note] InnoDB: Compressed tables use zlib 1.2.11
2025-02-21 16:51:26 31405 [Note] InnoDB: Using Linux native AIO
2025-02-21 16:51:26 31405 [Note] InnoDB: Using CPU crc32 instructions
2025-02-21 16:51:26 31405 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2025-02-21 16:51:26 31405 [Note] InnoDB: Completed initialization of buffer pool
2025-02-21 16:51:26 31405 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a n                                                                 ew database to be created!
2025-02-21 16:51:26 31405 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2025-02-21 16:51:26 31405 [Note] InnoDB: Database physically writes the file full: wait...
2025-02-21 16:51:26 31405 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2025-02-21 16:51:26 31405 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2025-02-21 16:51:27 31405 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2025-02-21 16:51:27 31405 [Warning] InnoDB: New log files created, LSN=45781
2025-02-21 16:51:27 31405 [Note] InnoDB: Doublewrite buffer not found: creating new
2025-02-21 16:51:27 31405 [Note] InnoDB: Doublewrite buffer created
2025-02-21 16:51:27 31405 [Note] InnoDB: 128 rollback segment(s) are active.
2025-02-21 16:51:27 31405 [Warning] InnoDB: Creating foreign key constraint system tables.
2025-02-21 16:51:27 31405 [Note] InnoDB: Foreign key constraint system tables created
2025-02-21 16:51:27 31405 [Note] InnoDB: Creating tablespace and datafile system tables.
2025-02-21 16:51:27 31405 [Note] InnoDB: Tablespace and datafile system tables created.
2025-02-21 16:51:27 31405 [Note] InnoDB: Waiting for purge to start
2025-02-21 16:51:27 31405 [Note] InnoDB: 5.6.50 started; log sequence number 0
2025-02-21 16:51:27 31405 [Note] RSA private key file not found: /usr/local/mysql/data//private_key                                                                 .pem. Some authentication plugins will not work.
2025-02-21 16:51:27 31405 [Note] RSA public key file not found: /usr/local/mysql/data//public_key.p                                                                 em. Some authentication plugins will not work.
2025-02-21 16:51:27 31405 [Note] Binlog end
2025-02-21 16:51:27 31405 [Note] InnoDB: FTS optimize thread exiting.
2025-02-21 16:51:27 31405 [Note] InnoDB: Starting shutdown...
2025-02-21 16:51:29 31405 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OKFilling help tables...2025-02-21 16:51:29 0 [Warning] TIMESTAMP with implicit DEFAULT value is depr                                                                 ecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more deta                                                                 ils).
2025-02-21 16:51:29 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstra                                                                 p.
2025-02-21 16:51:29 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.50) starting as process 31443                                                                  ...
2025-02-21 16:51:29 31443 [Note] InnoDB: Using atomics to ref count buffer pool pages
2025-02-21 16:51:29 31443 [Note] InnoDB: The InnoDB memory heap is disabled
2025-02-21 16:51:29 31443 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2025-02-21 16:51:29 31443 [Note] InnoDB: Memory barrier is not used
2025-02-21 16:51:29 31443 [Note] InnoDB: Compressed tables use zlib 1.2.11
2025-02-21 16:51:29 31443 [Note] InnoDB: Using Linux native AIO
2025-02-21 16:51:29 31443 [Note] InnoDB: Using CPU crc32 instructions
2025-02-21 16:51:29 31443 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2025-02-21 16:51:29 31443 [Note] InnoDB: Completed initialization of buffer pool
2025-02-21 16:51:29 31443 [Note] InnoDB: Highest supported file format is Barracuda.
2025-02-21 16:51:29 31443 [Note] InnoDB: 128 rollback segment(s) are active.
2025-02-21 16:51:29 31443 [Note] InnoDB: Waiting for purge to start
2025-02-21 16:51:29 31443 [Note] InnoDB: 5.6.50 started; log sequence number 1625977
2025-02-21 16:51:29 31443 [Note] RSA private key file not found: /usr/local/mysql/data//private_key                                                                 .pem. Some authentication plugins will not work.
2025-02-21 16:51:29 31443 [Note] RSA public key file not found: /usr/local/mysql/data//public_key.p                                                                 em. Some authentication plugins will not work.
2025-02-21 16:51:29 31443 [Note] Binlog end
2025-02-21 16:51:29 31443 [Note] InnoDB: FTS optimize thread exiting.
2025-02-21 16:51:29 31443 [Note] InnoDB: Starting shutdown...
2025-02-21 16:51:30 31443 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OKTo start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:/usr/local/mysql/bin/mysqladmin -u root password 'new-password'/usr/local/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'Alternatively you can run:/usr/local/mysql/bin/mysql_secure_installationwhich will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:cd . ; /usr/local/mysql/bin/mysqld_safe &You can test the MySQL daemon with mysql-test-run.plcd mysql-test ; perl mysql-test-run.plPlease report any problems at http://bugs.mysql.com/The latest information about MySQL is available on the web athttp://www.mysql.comSupport MySQL by buying support/licenses at http://shop.mysql.comNew default config file was created as /usr/local/mysql/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settingsWARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server

三:启动MySql

cd /usr/local/mysql/support-files/
./mysql.server start

启动成功的打印内容

[root@localhost scripts]# cd /usr/local/mysql/support-files/
[root@localhost support-files]# ./mysql.server start
Starting MySQL.Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
. SUCCESS!
[root@localhost support-files]#

在这里插入图片描述

四:登录配置MySql

4.1:登录MySQL
cd /usr/local/mysql/bin/
./mysql -u root

在这里插入图片描述
使用sql验证一下

SELECT VERSION();

在这里插入图片描述

4.2:检查 root 用户的权限:确保 root 用户的主机是 localhost 或 %(允许远程登录)。
SELECT user, host FROM mysql.user;

其中没有%(远程登录链接的权限)
在这里插入图片描述

4.3:创建新用户并授予权限(远程链接的权限)

FLUSH PRIVILEGES; 是刷新权限

CREATE USER 'root'@'%' IDENTIFIED BY 'new-password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;

在这里插入图片描述

五:设置MySql开机自启动

复制 MySQL 提供的启动脚本到系统目录:

cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld

赋予脚本可执行权限:

chmod +x /etc/init.d/mysqld

添加到开机启动

chkconfig --add mysqld
chkconfig mysqld on

在这里插入图片描述

六:开启3306端口防火墙,远程链接数据库

6.1:开启3306端口防火墙

添加3306端口规则

firewall-cmd --zone=public --add-port=3306/tcp --permanent

重新加载防火墙规则

firewall-cmd --reload

验证规则是否生效,如果返回 yes,说明端口已开放

firewall-cmd --zone=public --query-port=3306/tcp

最好打印yes就是将3306端口开放了
在这里插入图片描述

6.2:远程链接数据库

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

七:报错

7.1:使用 sudo yum install 进行下载插件的错误

http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl 注意:

原因

如果报下面的报错信息是因为 没有配置仓库

解决方法

在 Liunx教程中。3.配置仓库(用于yum下载)这个节点操作一遍

报错信息

已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"One of the configured repositories failed (未知),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem.2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=trueCannot find a valid baseurl for repo: base/7/x86_64

7.2 ./mysql_install_db 命令报错

错误信息

FATAL ERROR: please install the following Perl modules before executing ./mysql_install_db:
Data::Dumper

解决方式 安装 autoconf
yum -y install autoconf

7.3 mysql_install_db 失败 报 Table ‘mysql.plugin’ doesn’t exist,

解决方式

重新初始化数据目录。

7.4 忘记 root 密码

停止 MySQL 服务,然后以跳过权限检查的方式启动:

mysqld_safe --skip-grant-tables &

登录 MySQL 并重置密码:

UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root';
FLUSH PRIVILEGES;

7.5 -bash: ./mysql_install_db: /usr/bin/perl: 坏的解释器: 没有那个文件或目录

问题原因

mysql_install_db 是一个 Perl 脚本,需要 Perl 解释器来运行。

解决方法

安装 Perl

sudo yum install perl

7.6 nslookup mirrorlist.centos.org 这个命令无法使用,显示没有这个命令

解决方法

安装 bind-utils

sudo yum install bind-utils

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com