 |
|
 |
| |
Developer on focus
Anton Zamov is a dipl. engineer with more than 6 years of active professional
experience and many awards ...
read more>>
|
|
 |
 |
 |
|
 |
|
 |
| |
|
MySQL: Installation: configured for encryption, C API, and user defined functions
|
Installation: configured for encryption, C API, and user defined functions.
./configure --with-openssl --enable-thread-safe-client --with-mysqld-ldflags=-rdynamic
The --with-openssl is very helpful for creating your own
password file. Also, if doing C API, having thread safe
calls "could" come in handly...it's what I use.
See (TIP 27) for user defined functions.
Complete Steps:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd mysql-VERSION
shell> ./configure --with-openssl --enable-thread-safe-client --with-mysqld-ldflags=-rdynamic
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
See (TIP 25) for configuring the log-bin and log files in /etc/my.cnf
Installing mysql so that it will startup automatically.
This also enables it to be restarted, "/etc/init/mysql restart".
cp ./support-files/mysql.server /etc/init.d/mysql
cd /etc/rc3.d
ln -s ../init.d/mysql S85mysql
ln -s ../init.d/mysql K85mysql
cd /etc/rc5.d
ln -s ../init.d/mysql S85mysql
ln -s ../init.d/mysql K85mysql
cd ../init.d
chmod 755 mysql
Deleting any blank users or passwords, and creating a valid
user is shown below.
STEP 1:
First, connect to the mysql database
with the connect command:
mysql> connect mysql;
STEP 2:
Next, delete all blank accounts and/or
global host listing:
mysql> DELETE FROM user WHERE User = '';
mysql> DELETE FROM db WHERE Host = '%';
STEP 3:
Delete any accounts with blank passwords:
mysql> DELETE FROM user where password='';
STEP 4:
Create a valid admin account. The example
here creates admin1.
mysql> GRANT ALL PRIVILEGES ON *.* TO admin1@localhost
IDENTIFIED BY 's3cr3tpass45' WITH GRANT OPTION;
or if you want the account to get access from
any host.
mysql> GRANT ALL PRIVILEGES ON *.* TO admin1@"%"
IDENTIFIED BY 's3cr3tpass45' WITH GRANT OPTION;
STEP 5:
Restart the server "/etc/init.d/mysql restart"
|
About the author of this programming example or tutorial:
Mike Chirico (mchirico@users.sourceforge.net)
Copyright (c) 2004 (GPU Free Documentation License)
Last Updated: Tue Jul 20 12:14:51 EDT 2004
|
|
|
 |
 |
 |
|
|