Plugin Mysql
Plugin Mysql
Objective:
This guide provides a general guideline for users who would like to install mysql server
in Hong Kong Polytechnic University‟s Academic Unix Cluster Servers which are
running Solaris 10.
1. Pre-requisites:
1.2 Use SCP to transfer the mysql source (downloaded in step 1.1) into the
academic unix server hkpu10.
( Please read the document “SCP User Manual For Academic Unix Cluster”
for how to upload files into academic unix servers.
1.3 Use SSH login hkpu10.polyu.edu.hk with your NetID & NetPassword.
You will need below information during the installation process.
Do not use port in “LISTEN” state since there is service running on that
port and thus it is unavailable for use. Please choose other port for your mysql
service.
2. Installation
2.3 Running the installation under your own directory with your own user right
hkpu10% cd mysql
3. Configuration
basedir=
datadir=
basedir=<home dir>/mysql
datadir=<home dir>/mysql/data
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 8M
sort_buffer_size = 8M
[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M
[mysqlhotcopy]
interactive-timeout
Assume that the user is <USER> and password is <PASS> for connecting
myWeb service:
mysql>use mysql
(You should be able to see below four rows of hosts with above setting)
for example:
mysql> select host from user;
+-------------------------+
| host |
+-------------------------+
| hkpu63 |
| hkpu63.polyu.edu.hk |
| hkpu73 |
| hkpu73.polyu.edu.hk |
+-------------------------+
4.4. Write a simple php program to check the connectivity between mysql and
myweb.polyu.edu.hk
hkpu10% cd
hkpu10% cd public_html
hkpu10% vi testmysql.php
<?php
$dbname = "mysql";
$host = "hkpu10.polyu.edu.hk:<port num>";
$user = "<USER>";
$pass = "<PASS>";
http://myweb.polyu.edu.hk/~<NetID>/testmysql.php
If the page return “Remote Connect Successful”, then that means your mysql
installed successfully.
mysql Startup
hkpu10% <home dir>/mysql/support-files/mysql.server start
mysql Shutdown:
hkpu10% <home dir>/mysql/support-files/mysql.server stop
mysql Restart
hkpu10% <home dir>/mysql/support-files/mysql.server restart
Q1: When I run the “tar” command mentioned in step 1.1, there was an error. What
should I do?
Ans1: Firstly, please check the source file you downloaded from
http://dev.mysql.com/downloads/mysql/5.1.html#solaris is correct:
filename in .tar format
version of mysql source should be 5.1.37 or later
the source is for Solaris 10 (SPARC, 32 bit)
Secondly, please check you have sufficient disk quota for mysql installation. You
should have at least 600 MB free disk space available.
Ans2: You may check for any processes that have been started by your <NetID>:
hkpu10% ps –ef | grep <NetID>
The configuration file you have done in step 3.1 and step 3.3. Are the parameters
$datadir and $basedir configured correctly?
Is the port <port num> free for use? You should NOT choose any port that is in
“LISTEN” state.
You may examine the mysql log located in <home dir>/mysql/data/. The file
named hkpu10.err collects detailed messages for startup/shutdown of mysql.
While another file called hkpu10.pid saved your mysql process id.
Please check if you have sufficient disk quota for mysql startup. mySQL will
generate some system files. You would need 600 MB disk space for mysql
version 5.
Q4: I copied the mysql commands from a notepad/MS Word document and paste into the
Unix environment. I read from screen that the command is correctly typed but error
occurs.
Ans4: You are advised not to “copy and paste” Unix commands from non-unix
environment into unix servers. There might be unexpected result if you “copy and paste”
Unix commands from Windows environment (or different OS environment). Please type
the whole command word by word in Unix Server prompt.
Q5: The web browser replied an Error with "Could not connect Host to this mySQL
server", what should I do?