AlpineWeb Home
Search: For:   ~ Advanced Search  
  Support Home     Documentation     Knowledgebase     Help Desk     Blog 
Support Home > VPS > FreeBSD > Administration > vinstall > MySQL > Sunday, July 20, 2008

MySQL4.1


To install MySQL4.1, connect to your Virtual Private Server via SSH, su to root, and run the following command:
# vinstall mysql4.1
The vinstall script installs all the necessary files for you to run MySQL4.1.

MySQL5.0 is now available for install on the VPS v3 server.

To start the MySQL daemon from the command prompt, you can do so using the following command:
# /usr/local/bin/mysqld_safe --pid-file=/var/db/mysql/username.pid &
The line listed above can be found in a startup script created when MySQL installed. The script is located in the /usr/local/etc/rc.d directory called mysql-server.sh. When the server reboots the script will execute and start MySQL. The script can also be used to start and stop MySQL at any time by running these commands:
# /usr/local/etc/rc.d/mysql-server.sh stop

# /usr/local/etc/rc.d/mysql-server.sh start
While the the MySQL daemon is running, a mysql.sock file will be stored in the /tmp directory. This file is necessary for MySQL to function. If you are receiving errors when trying to connect to MySQL, check to make sure this file exists. If it is missing restart MySQL.
NOTES: After you install MySQL it is not necessary to run the mysql_install_db as described in Section 6.7 of the MySQL manual.

Also, the newest versions of MySQL use different password hashing algorithms than their predecessors. This can cause problems for older scripts, modules, programming languages, and MySQL clients attempting to authenticate using old algorithms. There are two solutions:
  • you can start MySQL (through /usr/local/etc/rc.d/mysql-server.sh or command line) with the following flag:

    --old-password
  • you can update the MySQL users' passwords to use the old algorithm with the following MySQL command:

    SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
More information about this problem can be found at the MySQL website:

http://dev.mysql.com/doc/refman/5.0/en/old-client.html

The mysql Client

To use the mysql client, connect to the VPS v2/v3 server via SSH, su to root, and run the following command:
# /usr/local/bin/mysql -u root
This command will start the MySQL client as the root user. You can add more users by following the directions in the MySQL Reference Manual: The MySQL client is designed to be able to report errors in numerous languages. While this does not affect the way you use MySQL, having the error messages in your native language could make understanding the errors easier. For more information, see the following: To make starting MySQL easier, you can create a file with all your start-up options instead of having to type in all the different flags at the command prompt. To do this, create a file in your /etc/ directory called my.cnf. The contents of the file would look like this if you wanted MySQL to report error messages in Japanese:
[mysqld]
language = japanese
default-character-set = ujis

Database Maintenance and Repair

It is not uncommon for a database to require maintenance or repair. Corruption in a database can cause slower response times and/or higher memory usage with MySQL. It is recommended that occasional checks are made to help keep MySQL running efficiently. A helpful mysqlcheck utility is available with the Mysql installation. Please see the following for more information:
mysqlcheck Utility

Documentation

Manpages are available and can be accessed by typing the following during an SSH session with your Virtual Private Server:
# man -M $HOME/usr/local/mysql/man mysql
There is also a considerable volume of documentation on the MySQL web site:


Technical Support
° Getting Started Guides
  FreeBSD
° Basic Hosting Help
° Signature Hosting Help
° VPS v1 Help
° VPS v2/3 Help
° MPS v2/3 Help
  Linux
° VPS v3 Help
° MPS v3 Help
  SaaS
° Sugar CRM
  DNS
° Domain Name Service
° Domain Registration
° Help Desk
° Knowledgebase
° Support Policies
° Disclaimer

° AlpineWeb Home
° Compare Hosting Plans
° Network Topology

° Rates & Fees
° Order Center




  Home | Site Map | Customer Backroom Copyright  ©  1997-2008  AlpineWeb Design