- 积分
- 29
- UID
- 21479
- 阅读权限
- 10
- 注册时间
- 2016-3-29
- 精华
- 在线时间
- 小时
- 最后登录
- 1970-1-1
- 职业
- 1
|
数据库安装完成后 建立了软连接
ln -s /application/mysql-5.5.32/ /application/mysql
在/etc/profile文件中加入了环境变量
export PATH=/application/mysql/binPATH
然后 目录和配置文件都建立好了
[root@localhost tools]# tree /data/
/data/
├── 3306
│ ├── data
│ ├── my.cnf
│ └── mysql
└── 3307
├── data
├── my.cnf
└── mysql
进入cd /application/mysql/scripts/ 中进行数据库初始化./mysql_install_db –basedir=/application/mysql –datadir=/data/3306/data –user=mysql
./mysql_install_db –basedir=/application/mysql –datadir=/data/3306/data –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 和mysql-5.5.32 目录文件发现是一样的没有区别
然后用/application/mysql-5.5.32/scripts/mysql_install_db --basedir=/application/mysql-5.5.32 --datadir=/data/3306/data --user=mysql 初始化正常
[root@localhost mysql-5.5.32]# /application/mysql-5.5.32/scripts/mysql_install_db --basedir=/application/mysql-5.5.32 --datadir=/data/3306/data --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:
/application/mysql-5.5.32/bin/mysqladmin -u root password 'new-password'
/application/mysql-5.5.32/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/application/mysql-5.5.32/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-5.5.32 ; /application/mysql-5.5.32/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /application/mysql-5.5.32/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /application/mysql-5.5.32/scripts/mysqlbug script!
[root@localhost mysql-5.5.32]# tree /data/
/data/
├── 3306
│ ├── data
│ │ ├── mysql
│ │ │ ├── columns_priv.frm
│ │ │ ├── columns_priv.MYD
│ │ │ ├── columns_priv.MYI
│ │ │ ├── db.frm
│ │ │ ├── db.MYD
│ │ │ ├── db.MYI
│ │ │ ├── event.frm
│ │ │ ├── event.MYD
│ │ │ ├── event.MYI
│ │ │ ├── func.frm
│ │ │ ├── func.MYD
│ │ │ ├── func.MYI
│ │ │ ├── general_log.CSM
│ │ │ ├── general_log.CSV
│ │ │ ├── general_log.frm
│ │ │ ├── help_category.frm
│ │ │ ├── help_category.MYD
│ │ │ ├── help_category.MYI
│ │ │ ├── help_keyword.frm
│ │ │ ├── help_keyword.MYD
没搞懂这是为什么
|
|