If you have a Solaris or Linux web hosting account with
us, please contact us to request our technical support group to setup
a MySQL database for you and supply you with the database name, database
host, username and password that you need to access the database.
If you have a dedicated server with us, running Red Hat Linux, the
server already supports MySQL.
Securing MySQL for the First time
The MySQL installation "out-of-box" is extremely insecure. Before we
start doing anything, we should create a root password to secure the
configuration of the MySQL server.
shell> mysql -u root mysql
mysql> UPDATE user
SET Password=PASSWORD('new_password')
WHERE user='root';
mysql> FLUSH PRIVILEGES;
Or, you can do this:
shell> mysqladmin -u root password new_password
To check, do this:
shell> mysql -u root -p mysql
MySQL will then prompt for a password, use the
new_password.
Setup new MySQL Database
To create a new MySQL database::
shell> mysqladmin -p create databasename
You will be prompted for the MySQL root password which you have setup
previously. Once the new database is created, you can assign a MySQL
username and password to access it:
shell> mysql -u root -p mysql
mysql> grant all privileges on databasename.*
to username@localhost
identified by 'password';
mysql> FLUSH PRIVILEGES;
Depending on how you are connected to MySQL, You may also have to
duplicate the username entry with this:
mysql> grant all privileges on databasename.*
to username@'%'
identified by 'password';
mysql> FLUSH PRIVILEGES;
To check, do this
shell> mysql -u username -p databasename
You will be prompted for a password, use the password you setup
previously for the username. Or, in Perl/DBI, you can use this:
E Commerce in a Box ResponsiveWeb CommerceBolt:
Amazon.com grade shopping cart! Get listed in Froogle, Pricegrabber, Bizrate, & manage your inventory, shipments, orders, & more.
Web Design
Clean, Professional, and Effective. Web Design without the child's play. Cutting Edge Design: starting at $299, with a Free Domain Name, Free Database, & Free Month of Hosting