Advertisement
Guest User

Untitled

a guest
Mar 4th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. 1. tar -xzvf mysql-standard-5.1.34-linux-i686-glibc23.tar.gz
  2. 2. ln -s mysql-standard-5.1.34-linux-i686-glibc23 mysql
  3. a) set basedir= to the full path of your new mysql directory
  4. b) set datadir= to the full path of the /data subdir in your new mysql directory.
  5. 3. Set up the default MySQL databases:
  6. a) ./scripts/mysql_install_db --defaults-file=mysql.cnf
  7. b) ./bin/mysqladmin --defaults-file=mysql.cnf -u root password "yourpasswordhere"
  8. 4. Create a New Database and User Account
  9. a) Log in to your mysql server as root: ./bin/mysql --defaults-file=mysql.cnf -u root -p
  10.  
  11. [client]
  12. socket=/tmp/mysql_2.sock
  13. port=3307
  14. ####################################
  15. [mysqld]
  16. #REQUIRED!!
  17. #Change the basedir directory to reflect your mysql home directory
  18. basedir=/mysql
  19. #REQUIRED!!
  20. #Change the data direcory to reflect your mysql data directory
  21. datadir=/mysql/data
  22. port=3307
  23. socket=/tmp/mysql_2.sock
  24. key_buffer_size=64M
  25.  
  26. #[OPTIMIZATION]
  27. #Set this value to 50% of available RAM if your environment permits.
  28. myisam_sort_buffer_size=1.5G
  29. #[OPTIMIZATION]
  30. #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!
  31. myisam_max_sort_file_size=100G
  32.  
  33. #[OPTIMIZATION]
  34. #Our default of 2G is probably fine for this value. Change this value only if you are using a machine with little resources available.
  35. read_buffer_size=1.5G
  36.  
  37. root@ubuntu:/mysql# ./bin/mysqld_safe --defaults- file=mysql.cnf &
  38.  
  39. [1] 2386
  40. root@ubuntu:/mysql# 140415 19:08:12 mysqld_safe Logging to '/mysql/data/ubuntu.err'.
  41. chown: invalid user: `mysql'
  42. 140415 19:08:12 mysqld_safe Starting mysqld daemon with databases from /mysql/data
  43. 140415 19:08:12 mysqld_safe mysqld from pid file /mysql/data/ubuntu.pid ended
  44.  
  45. ./bin/mysqladmin --defaults-file=mysql.cnf -u
  46. ./bin/mysqladmin --defaults-file=mysql.cnf -u root password 12345
  47. ./bin/mysqladmin: connect to server at 'localhost' failed
  48.  
  49. error: 'Can't connect to local MySQL server through socket '/tmp/mysql_2.sock' (2)'
  50.  
  51. Check that mysqld is running and that the socket: '/tmp/mysql_2.sock' exists!
  52. [1]+ Done ./bin/mysqld_safe --defaults-file=mysql.cnf
  53.  
  54. ./bin/mysql --defaults-file=mysql.cnf -u root -p
  55.  
  56. Enter password:
  57.  
  58. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql_2.sock' (2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement