阿里云安装mysql初始化的时候出现如下错误,以及解决方法
来源:互联网 发布:mac壁纸软件推荐 编辑:程序博客网 时间:2024/05/18 12:41
对mysql数据库初始化过程中,会有如下报错信息:
1
2
3
4
5
6
7
[root@localhost scripts]
# ./mysql_install_db --user=mysql
FATAL ERROR: Could not
find
.
/bin/my_print_defaults
If you compiled from
source
, you need to run
'make install'
to
copy the software into the correct location ready
for
operation.
If you are using a binary release, you must either be at the
top
level of the extracted archive, or pass the --basedir option
pointing to that location.
按照报错信息,去mysql安装目录的bin目下查找是否有_print_defaults,在第一列的第七行有发现这个文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[root@localhost bin]
# ls
innochecksum mysql_client_test mysql_setpermission
msql2mysql mysql_client_test_embedded mysqlshow
myisamchk mysql_config mysqlslap
myisam_ftdump mysql_convert_table_format mysqltest
myisamlog mysqld mysqltest_embedded
myisampack mysqld_multi mysql_tzinfo_to_sql
my_print_defaults mysqld_safe mysql_upgrade
mysql mysqldump mysql_waitpid
mysqlaccess mysqldumpslow mysql_zap
mysqlaccess.conf mysql_find_rows perror
mysqladmin mysql_fix_extensions replace
mysqlbinlog mysqlhotcopy resolveip
mysqlbug mysqlimport resolve_stack_dump
mysqlcheck mysql_secure_installation
看来其实不是没有这个文件,不是这个问题。
认真查看报错信息,可注意到那个路径是相对路径,是以mysql的安装目录为起始。
而初始化则是进去初始化脚本目录里运行脚本,而在这个目录下不会有./bin/my_print_defaults的。
所以回到安装目录以相对路径去执行初始化脚本。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[root@localhost mysql]
# ./scripts/mysql_install_db --user=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
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To
do
so, start the server,
then
issue the following commands:
.
/bin/mysqladmin
-u root password
'new-password'
.
/bin/mysqladmin
-u root -h localhost.localdomain password
'new-password'
Alternatively you can run:
.
/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
. ; .
/bin/mysqld_safe
&
You can
test
the MySQL daemon with mysql-
test
-run.pl
cd
.
/mysql-test
; perl mysql-
test
-run.pl
Please report any problems with the .
/bin/mysqlbug
script!
[root@localhost mysql]
#
OK!初始化成功!
希望能对大家有帮助
原博客地址
阅读全文
0 0
- 阿里云安装mysql初始化的时候出现如下错误,以及解决方法
- 阿里云安装mysql
- 阿里云安装mysql
- makeimg 的时候出现如下错误
- 安装MySql以及出现错误的解决方法
- 阿里云安装MySQL总结
- 使用ant debug编译的时候出现如下错误
- 对工程进行Archive打包的时候出现如下错误
- ADT 项目转为 As项目的时候出现如下错误
- 阿里云安装 JDK mysql 环境搭建
- 阿里云安装mysql详细过程
- 阿里云安装jdk-tomcat-mysql
- 阿里云安装LNMP以及更改网站文件和MySQL数据目录
- 打开Navicat for MYSQL报如下的错误解决方法
- java中出现如下错误解决方法:
- 1. 出现如下的错误
- 阿里云安装oracle没有swap空间建议解决方法
- 阿里云安装docker
- 1.对象导论---java编程思想(学习笔记)
- 蓝桥杯 算法训练 大小写转换
- async/await使用心得
- 20171203:数组拷贝、三种重要排序(冒泡、插入、快排)、二维数组的学习
- Python 从入门到实践 5-8 课后习题
- 阿里云安装mysql初始化的时候出现如下错误,以及解决方法
- 【Scikit-Learn 中文文档】内核近似
- Android IOS 移动端前端框架对比——framework7,SUI,MUI框架——React Native和Vuejs
- 欢迎使用CSDN-markdown编辑器
- Lintcode:Fizz Buzz 问题
- 【Scikit-Learn 中文文档】成对的矩阵, 类别和核函数
- Linux笔记 分类_https://crossoverjie.top
- 虚拟机之间的配置
- Hadoop安装使用HDFS(Windows)