Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. tar -xzvf mysql-standard-5.1.34-linux-i686-glibc23.tar.gz
- 2. ln -s mysql-standard-5.1.34-linux-i686-glibc23 mysql
- a) set basedir= to the full path of your new mysql directory
- b) set datadir= to the full path of the /data subdir in your new mysql directory.
- 3. Set up the default MySQL databases:
- a) ./scripts/mysql_install_db --defaults-file=mysql.cnf
- b) ./bin/mysqladmin --defaults-file=mysql.cnf -u root password "yourpasswordhere"
- 4. Create a New Database and User Account
- a) Log in to your mysql server as root: ./bin/mysql --defaults-file=mysql.cnf -u root -p
- [client]
- socket=/tmp/mysql_2.sock
- port=3307
- ####################################
- [mysqld]
- #REQUIRED!!
- #Change the basedir directory to reflect your mysql home directory
- basedir=/mysql
- #REQUIRED!!
- #Change the data direcory to reflect your mysql data directory
- datadir=/mysql/data
- port=3307
- socket=/tmp/mysql_2.sock
- key_buffer_size=64M
- #[OPTIMIZATION]
- #Set this value to 50% of available RAM if your environment permits.
- myisam_sort_buffer_size=1.5G
- #[OPTIMIZATION]
- #This value should be at least 50% of free hard drive space. Use caution if setting it to 100% of free space however. Your hard disk may fill up!
- myisam_max_sort_file_size=100G
- #[OPTIMIZATION]
- #Our default of 2G is probably fine for this value. Change this value only if you are using a machine with little resources available.
- read_buffer_size=1.5G
- root@ubuntu:/mysql# ./bin/mysqld_safe --defaults- file=mysql.cnf &
- [1] 2386
- root@ubuntu:/mysql# 140415 19:08:12 mysqld_safe Logging to '/mysql/data/ubuntu.err'.
- chown: invalid user: `mysql'
- 140415 19:08:12 mysqld_safe Starting mysqld daemon with databases from /mysql/data
- 140415 19:08:12 mysqld_safe mysqld from pid file /mysql/data/ubuntu.pid ended
- ./bin/mysqladmin --defaults-file=mysql.cnf -u
- ./bin/mysqladmin --defaults-file=mysql.cnf -u root password 12345
- ./bin/mysqladmin: connect to server at 'localhost' failed
- error: 'Can't connect to local MySQL server through socket '/tmp/mysql_2.sock' (2)'
- Check that mysqld is running and that the socket: '/tmp/mysql_2.sock' exists!
- [1]+ Done ./bin/mysqld_safe --defaults-file=mysql.cnf
- ./bin/mysql --defaults-file=mysql.cnf -u root -p
- Enter password:
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql_2.sock' (2)
- socket=/var/lib/mysql/mysql.sock
- mysqladmin -u root -p status
- sudo chmod -R 755 /var/lib/mysql/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement