Online
 
Thursday, 20 November 2008
 
 

Using the MySQL Client | Print |  E-Mail
 

To follow along with the examples in this chapter, you will need to be familiar with using the MySQL client to access your database server. Although some graphical clients are available, this chapter uses the standard MySQL client available in both Windows and Unix distributions of the MySQL package.

To begin using MySQL and storing and retrieving data from the database server, you will need to log in to the server using the MySQL client. You can use the mysql command from a command prompt in Unix or Windows environments, as shown:

[user@localhost]# mysql [-u<username> [-p] [-h<hostname>]]

 

<username> is the username you use to access your database (if using the instructions found earlier in this section, the user name is "unleashed") and optionally <hostname> is the server name or IP address where the MySQL server is located. Usually the MySQL server resides on the same machine; for these circumstances, a hostname is not required and the default localhost will be used by the client. After you have executed the mysql command, you will be asked to enter your password and then you'll be brought to the MySQL console prompt:

[user@localhost]# mysql -uunleashed -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.0.12-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>

 

At this point, you will now be able to use SQL commands to access the data that the account has access to.

This entry was posted on . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a comment.
Users' Comments (0)

Comment an article
  Name
  E-mail
   Title
Available characters: 4000
 Notify me of follow-up comments
This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see:

No comment posted

Rokok Kretek Jumbo Coklat

“Terbuat dari tembakau, saos dan cengkeh pilihan kwalitas tinggi sehingga menghasilkan rokok dengan rasa yang cocok untuk segala cuaca”
Jumbo Coklat - Powered By G-Ads

 
Top! Top!