PHP & MySQL® Web Development All-in-One Desk Reference for Dummies®
by Janet Valade, Tricia Ballad, Bill Ballad
3.6. Testing MySQL
You can test whether MySQL is running by entering the following commands at the command line:
Change to the directory where MySQL is installed.
For instance, type cd c:\program files\mysql\mysql server 5.0.
Note: In Windows, open a command prompt window to provide a place where you can type the command.
Change to the bin subdirectory (cd bin).
Type mysqladmin version.
Output providing information on the MySQL version displays on the screen.
You can further test that MySQL is ready to go by connecting to the MySQL server from the mysql client. When MySQL is installed, a simple, text-based program called mysql is also installed. Because this program connects with a server, it's called a client. This program connects to the MySQL server and exchanges messages with the server. The program is located in the bin subdirectory in the directory where MySQL is installed.
To test that the MySQL server is running and accepting communication, perform the following steps:
Start the client.
In Unix and Linux, type the path/filename (for example, /usr/local/mysql/bin/mysql).
In Windows, open a command prompt window and then type the path\filename (for example, c:\ Program Files\MySQL\MySQL Server 5.0\bin\mysql).
This command starts the client if you don't need to use an account name or a password. If you need to enter an account or a password or both, use the following parameters:
-u user: user is your MySQL account name.
-p: This parameter prompts you for the password for your MySQL ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access