| MySQL | ||||
|
If you can't find your question, please let us know and we'll answer it in email.
How do I access My database?Your Account Database is already initialized by default and ready for your use. After logging in with ssh, type: You can also access it with the following commands:
Your User Name and Database Name are both the same as your HE account name. How do I change my mySQL password?First, log in to your mySQL database from a shell prompt. Then issue the following command:
where
What is the mysql port number?The port is the default standard port: 3306. Most programs like PHP and Perl DBI will take this port if it is not specified. How do I backup or transfer my database?mySQL databases are not backed up like ordinary files. Even if it were possible, it would not be a good solution, as it could corrupt the database by doing so. To back up your database, ssh to your account, then use the mysqldump command:
mysqldump -ppassword DatabaseName > db.sql
('db.sql' is the name of your backup dump file, which you can change to whatever name you choose) That backs up the whole database in standard SQL text format. Both the structure (like
for all the command line options. To restore the dump, just type: mysql -p dbname < db.sql
For the data dump (the INSERT commands) it will append any new data if it does not yet exist. If you have a database that is in frequent use, such as one linked to a dynamic web interface being updated by your web site visitors, it is a good idea to make a daily backup of the data. To transfer a database, create the dump as described above, use ftp to upload it on the second server, and then restore it as above. Backing up the database is not done through an ftp database directly. You first need to generate an sql dump, and then download this dump. Use the following mysqldump command:
Then use the following command to view the dump:
(exit with: To put the file back:
All of the database will be generated, including structure. For more details, use
How is 'mySQL' pronounced?
|
||||
|
Hurricane Electric 760 Mission Court Fremont, CA 94539 |
FAQ Index Copyright © 1994 - 2004 Hurricane Electric. All Rights Reserved. |
Voice 510.580.4100 Fax 510.580.4151 Comments? info@he.net |