Mysql
Some netizens in the forum asked MySQL under the SCO Unix openserver installation, just installed a new
3.23.25Beta, may wish to introduce the experience:
I was installed on Linux, but the other UNIX platform should be the same, the Ancients cloud: "The old".
MySQL is home on the tarball format of the binary. That is, do not have to recompile the version to choose the corresponding flat
The file download and then untie the table. Assuming the decompression to/usr/local, the work required is nothing more than
Gunzip
Tar xvf
You can see that there is a mysql-3.23.xx directory. I don't like that long directory name, though
Mysql* can be entered with a CD, but not very well. What do we do? Very simple:
MV mysql* MySQL
Well, that's it.
What the? Did you get it wrong?
Your husband is too much, it is simply to deceive you reader feelings!
By the way, the rest of the story is simple and simple, complicated and complex to say.
Go to the Suport-files directory to see, there are a few. cnf file, you pick a pleasing to the eye,
CP MY-MEDIUM.CNF/ETC/MY.CNF
Then revise/etc/my.cnf, the knowledge is here the head: the nonsense says less, we kill mysqld that section straight.
# The MySQL server
[Mysqld]
Port = 8888
Socket =/tmp/mysql.sock
Log =/var/log/mysql.log
Basedir =/usr/local/mysql
DataDir =/free/mysqldbf
user = MySQL
See the above lines are not, some of which I add, some are original, but there is no parameter. All right
One of our analysis:
Port is the ports, we know that the MySQL default port is 3306, in order to secure, also let others do not know
Our database server, we deliberately change the port so that even if the hacker scans to 8888 of this port, also do not know
The road runs is what database, if is 3306, you also guessed is MySQL.
The socket is the network channel, you can define it to other places, but need to pay attention to permissions.
Log files, the default is to write to the database directory, in order to manage the convenience, I wrote it to the system log
Directory.
Basedir is the directory where MySQL is running, note that it is not the bin directory where MySQL resides.
DataDir is the MySQL place database directory, for data management convenience, I wrote it to another directory,
is not the default current directory of the data directory.
User is running MYSQLD users, for security, do not recommend the use of root, so you need to build a dedicated run
The user of this deamon.
That's all. Before running, you need to set up a database MySQL system in the database directory, run
./scripts/mysql_install_db
You can see that the database directory adds two directories to MySQL and test. And then start:
./bin/safe_mysqld &
It's done! Congratulations to you!
What, "Mysqld ended"! It doesn't matter, look at what Error-log said! Report back to me again!
This error-log in the directory where the database is located, and if there is a problem, it may be insufficient permissions.
The most thorough thing is to dissect safe_mysqld this shell.
/bin/mysqld--help can also solve most of your problems.
If you want the system to start automatically when running MySQL, it
Vi/etc/rc.d/rc.local
This dongdong is like the familiar Autoexec.bat, at the end of the file add:
Cd/usr/local/mysql
./bin/safe_mysqld &
Oh! Get!