|
[ Order a Server ] [ Server Support ] |
|
[ Getting Started ] [ Server Help ] [ Add on Help ] [ Solution ] [ Trouble Shooting ] PLEASE NOTE, THIS IS VERY OLD ARCHIVE INFORMATION AND MAY NOT FUNCTION ON NEW SERVERS
Installing MySQLTo install MySQL, connect to your Virtual Server via Telnet or SSH and run the MySQL installation script that matches your Virtual Server O/S:% vinstall mysql This command will automatically install all the necessary files for you to run MySQL. It will also start the mysql daemon running on your Virtual Server and setup the Virtual Server to restart the mysql daemon whenever your Virtual Server's host server reboots. Starting MySQLTo use the MySQL client type:% mysql -u root
This command will start the MySQL client as the root user. You can add
more users by following the directions in section: Please note, YOU are responsible for reading the MySQL manual and insuring your MySQL databases are secure.
The following is recommended to setting an initial password to prevent others from accessing your
databases without authenticating themselves. At the shell prompt type:
Using the last example when you are, for example, using your PHP scripts to access your MySQL databases you will need to supply
login information such as:
% mysql -u root -p mysql>create database DBNAME; Replace "DBNAME" with your desired mysql database name. To delete a mysql database: mysql>drop database DBNAME; To show all current databases: (note, you type this at just shell prompt, not mysql prompt ) shell>mysqlshow It will show something like this...
server% mysqlshow
If you have already created a database and want to give access rights to a specific user to "that" database only, then you should
first read Section 6.11 of the manual. The following is an example directly from the manual:
% mysql -u root -p 2. Create database: mysql>create database mystuff; 3. Set username password:
mysql>GRANT ALL PRIVILEGES
You can then allow this particular user to use PHP and access a mysql database with this php/mysql information: An excellent PHP program which can GREATLY reduce your MySQL database creation and manipulation time can be found by clicking here: phpMyAdmin Should you ever need to restart mysql from the command prompt, you may do so using the following command:
%cd This will execute the start command for mysql located in the /etc/rc file.
DocumentationManpages are available on each Virtual Server host server and can be accessed by typing the following during a telnet session with your Virtual Server:% man mysql PLEASE NOTE, THIS IS OLD ARCHIVE INFORMATION AND MAY NOT FUNCTION ON NEW SERVERS |