MySQL server on the Z
From OESF
Line 1: |
Line 1: | ||
Here are a few tips on using MySQL server on the Z. | Here are a few tips on using MySQL server on the Z. | ||
| - | + | Downloading - | |
| - | + | mysql server for the Z http://www.caulfei.demon.co.uk/zaurus/ | |
| - | + | Installing - | |
| - | + | Transfer the ipk onto your Z and switch to the Settings tab, then tap on the Add/Remove Software icon. %%% On the next screen you will want to tap on the Install packages button. You should see a package called mysql. %%% Tap the app to start the install. (You may install this package on a CF card, but I would suggest installing it on your Z's internal memory first) | |
| - | + | Starting - | |
| - | + | From the Application tab you will want to tap the Terminal icon to open a terminal session. From the terminal line you will type mysqlstart. %%% If successfull the screen will display 'Starting MySQL database server: mysqld.' To test that you MySQL server is stopped you can type MySQL. You will recieve a 'Welcome to the MySQL monitor. %%% Commands end with ; or \g. Your MySQL connection id is 1 to server version: 3.22.32-log. Type 'help' for help.' | |
| - | + | Stopping - | |
| - | + | From the Application tab you will want to tap the Terminal icon to open a terminal session. From the terminal line you will type mysqlstop. <br>If successfull the screen will display 'Stopping MySQL database server: mysqld.' To test that you MySQL server is stopped you can type MySQL. You will recieve a 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).' | |
| - | + | Creating tables - | |
| - | + | I would suggest downloading on of the many GUI apps for working with MySQL. They are available at www.mysql.com. If you are a beginnner this is the way to go. | |
| - | + | Changing the location of your data files - | |
| - | + | To change the location of you database files for MySQL you will need to do the following. | |
| - | + | Edit the /etc/mysql/my.cnf file. | |
| - | + | Change the following line. | |
| - | + | datadir = /var/lib/mysql | |
| - | + | to | |
| - | + | datadir = /mnt/cf/mysql | |
| - | + | Save your changes over the existing /etc/mysql/my.cnf file. | |
| - | + | Make sure when it saves that it saves as my.cnf, not | |
| - | + | mn.cnf.txt like the crummy Text editor on the Z likes | |
| - | + | to do. | |
| - | + | Next, make a directory on you cf card to store the data. I created a /mnt/cf/mysql directory. This is the directory that you pointed your datadir to in the my.conf file you edited. | |
| - | + | After creating the /mnt/cf/mysql directory you will need to go to your old datadir (/var/lib/mysql) and copy the entire contents of this folder into your new /mnt/cf/mysql folder. | |
| - | + | You should now be able to start your mysql server. | |
Revision as of 02:55, 28 November 2004
Here are a few tips on using MySQL server on the Z.
Downloading -
mysql server for the Z http://www.caulfei.demon.co.uk/zaurus/
Installing -
Transfer the ipk onto your Z and switch to the Settings tab, then tap on the Add/Remove Software icon. %%% On the next screen you will want to tap on the Install packages button. You should see a package called mysql. %%% Tap the app to start the install. (You may install this package on a CF card, but I would suggest installing it on your Z's internal memory first)
Starting -
From the Application tab you will want to tap the Terminal icon to open a terminal session. From the terminal line you will type mysqlstart. %%% If successfull the screen will display 'Starting MySQL database server: mysqld.' To test that you MySQL server is stopped you can type MySQL. You will recieve a 'Welcome to the MySQL monitor. %%% Commands end with ; or \g. Your MySQL connection id is 1 to server version: 3.22.32-log. Type 'help' for help.'
Stopping -
From the Application tab you will want to tap the Terminal icon to open a terminal session. From the terminal line you will type mysqlstop.
If successfull the screen will display 'Stopping MySQL database server: mysqld.' To test that you MySQL server is stopped you can type MySQL. You will recieve a 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).'
Creating tables -
I would suggest downloading on of the many GUI apps for working with MySQL. They are available at www.mysql.com. If you are a beginnner this is the way to go.
Changing the location of your data files -
To change the location of you database files for MySQL you will need to do the following.
Edit the /etc/mysql/my.cnf file.
Change the following line. datadir = /var/lib/mysql to datadir = /mnt/cf/mysql Save your changes over the existing /etc/mysql/my.cnf file. Make sure when it saves that it saves as my.cnf, not mn.cnf.txt like the crummy Text editor on the Z likes to do.
Next, make a directory on you cf card to store the data. I created a /mnt/cf/mysql directory. This is the directory that you pointed your datadir to in the my.conf file you edited.
After creating the /mnt/cf/mysql directory you will need to go to your old datadir (/var/lib/mysql) and copy the entire contents of this folder into your new /mnt/cf/mysql folder.
You should now be able to start your mysql server.

