Lorelei web - free tools, smileys, wallpapers and virus scans
     Home     |    eCards    |     Desktop and MSN     |     Webmasters Tools     |     Computer's Security     |     Photoshop Tutorials      |     Links    
       Webmasters Tips - MySQL
Choose any of our tutorials and articles:

How to Make a Million Online
Adsense Optimization Tips
Paid to Read emails - Real price
How to Promote a New Forum
Website promotion
Choose the right hosting plan
Bandwidth stealing
Design Rules
Navigation
Valid code
Make money with your site
Affiliate marketing
Avoid waste of bandwidth
Bandwidth usage
MySQL
PHP programming
Cookies
Make a fast loading site
Starting a business

MySQL is an open source Relational Database Management System (RDBMS) based around the Structured Query Language (SQL). In short, MySQL is in fact a software that allows you to manage your databases.

And now you are going to ask: what is a database then? In this case, a database is a table of information stored on a server. When you have a table in your MySQL database, you can use PHP to pull that information from the database to your website, which would then make your website dynamic! We have a MySQL server running for those of you with paid hosting accounts. There are a few ways that you can access and use your MySQL server.

We have phpMyAdmin installed for our members. phpMyAdmin is an interface that resembles a website that you can use to administrate your databases. It might seem confusing at first, but once you've had a look through our MySQL articles and tutorials, you will have a better understanding of what means what.

As the name implies, MySQL servers are based off of the Structured Query Language and you use queries to create, delete, and alter your databases and tables.

The MySQL client program, also known as the MySQL monitor, is an interface that allows the user to connect to the MySQL server, create and modify databases, and execute queries and view their results. This program is started by executing the command mysql at the shell prompt. In general, the syntax for this command is: %>mysql [options] [database]
Where [options] can be one or a series of options used in conjunction with the mysql program, and [database] is the name of the database to use. Since it is assumed to be the reader's first time using the MySQL monitor, take a moment to review all offered options by executing the following command: %>mysql --help This produces a long list of options that can be used in conjunction with the mysql program. For the moment, however, the main goal is to simply connect to the database server. Therefore, execute the following command: %>mysql -u root
The following should appear:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 to server version: 3.23.28-gamma-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer mysql>
Congratulations, you are now connected to the MySQL monitor as the almighty root user. Your first official action as this supreme leader of the MySQL database server should be to ensure that nobody else can declare this position. Therefore, make it possible to only connect as root in the future by supplying a password. Change the password from its current blank (or null) value, to something difficult to guess using the following command:
mysql>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('secret_password');

The 'root', which is the username, and 'localhost', which is the hostname, constitute a unique user in MySQL. For those readers perhaps unfamiliar with networking terminology, 'localhost' is a name used to specify the local server; that is, the server upon which MySQL resides. Therefore, by stating 'root'@'localhost', this command is telling the MySQL server to set the password for a user named 'root' that will connect specifically from the local server (thus 'localhost'). More specifically, this command will change the password by updating what are commonly known as the MySQL privilege tables. These tables, collectively located in the mysql database, contain information regarding the connection and usage capabilities of all users intended to use the MySQL database server. More specifically, this command will update the user table, updating the password field of the row in which the user field's value is 'root'. The password field will be updated with the encrypted value of the string enclosed within the Password() function.

Of course, do not forget this password. Since it is stored in encrypted text on the database server, it cannot simply be looked up if forgotten. There is also an alternative method for updating a password: %>mysqladmin -u root password 'secret_password' This command will accomplish the same results as the one previously introduced.

Summary: If you're a heavy user of web applications, you will be pleased to learn that MySQL meshes perfectly with the Perl Hypertext Preprocessor (PHP) dynamic web development language. If you're a Microsoft IIS user, it works quite well with Active Server Pages (ASP), as well. In fact, if your ASP code is ANSI SQL-compliant, you may be able to simply plug and play a MySQL server into your production environment very easily.


m e n u