linux下配置mysql和mysql初始化

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux下配置mysql和mysql初始化相关的知识,希望对你有一定的参考价值。

下面是正常初始化后提示的信息,这篇文章很重要

[[email protected] scripts]# ./mysql_install_db --basedir=/application/mysql --datadir=/application/mysql/data/ --user=mysql

##指定mysql安装路径,指定数据文件夹data路径,指定用户初始化

WARNING: The host ‘dataserver‘ could not be looked up with resolveip.

警告:不能用resoleip查找主机的数据表。

This probably means that your libc libraries are not 100 % compatible

这可能意味着您的libc库并不是100%兼容的使用这个二进制MySQL版本。

with this binary MySQL version. The MySQL daemon, mysqld, should work

MySQL守护进程mysqld应该工作

normally with the exception that host name resolving will not work.

通常情况下,主机名解析不会起作用。

This means that you should use IP addresses instead of hostnames

这意味着你应该使用IP地址而不是主机名

when specifying MySQL privileges !

在指定MySQL特权时!

Installing MySQL system tables...

OK

Filling help tables...

OK


To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

要在启动时启动mysqld,必须复制

支持文件/ mysql。服务器到您的系统的正确位置

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

请记住为MySQL根用户设置密码!

为此,启动服务器,然后发出以下命令:

/application/mysql/bin/mysqladmin -u root password ‘new-password‘

/application/mysql/bin/mysqladmin -u root -h dataserver password ‘new-password‘


Alternatively you can run:

/application/mysql/bin/mysql_secure_installation


which 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 /application/mysql ; /application/mysql/bin/mysqld_safe &


You can test the MySQL daemon with mysql-test-run.pl

cd /application/mysql/mysql-test ; perl mysql-test-run.pl


Please report any problems with the /application/mysql/scripts/mysqlbug script!


本文出自 “董利强” 博客,请务必保留此出处http://6207422.blog.51cto.com/6197422/1967955

以上是关于linux下配置mysql和mysql初始化的主要内容,如果未能解决你的问题,请参考以下文章

linux 用rpm安装完成mysql后怎么进行初始化

linux安装MySQL记录

如何在linux下安装mysql数据库并配置

(--1--)在Linux环境下忘记mysql密码处理方法

linux 下 设置 MySQL8 表名大小写不敏感方法,解决设置后无法启动 MySQL 服务的问题

Linux 上的mysql初始配置与主从复制