I'm using:

Windows 7 Home Premium 64-bit operating system
Netbeans IDE 8.0
WAMP Server 2.5

Here is my issiue. I am attempting to follow the E-commerce tutorial in the Netbeans Java EE & Java Web learning trail (Section 3 "The NetBeans E-commerce Tutorial - Setting up the Development Environment"). In the 3rd part of that section is "Communicating with the Database Server". I'm trying to check if the MySql server is running using the command

shell> mysqladmin ping

Should return:

"mysqld is alive"

If the server is runnig or:

"mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!"

If the server is not running.

I'm getting:

ERROR 1064 <42000>: You have an error in your SQL syntax; chec the manual that corresponds to your MySQL server version for the right syntax to use near 'shell> msqladmin ping' at line 1

I should be able to enter sql commands from any command line console but I have tried the cmd.exe, Windows Powershell and a command console that is included with wamp server app titled "MySQL console. I have researched for a few days now and trying everything I could find to no avail. ANY HELP would be appreciated.

Would be nice if you provided solution not just close thread...

I am very sorry about not posting my solution. Here is what I had to do.

  1. Click start

  2. In the search box type: cmd

  3. Click "cmd.exe" to bring up the command console

  4. The command line should look like "C:\Users\User's Name>" or something simular.

  5. I used CD C:\wamp\bin\mysql\mysql5.6.17\bin to change the directory path for my commands. The location of mysql install. More importantly the location of mysqladmin.exe.

  6. Now the path should point to the location of mysqladmin.exe on your system. Now just type: mysqladmin ping and hit enter.

  7. If mysql is running it should return: mysql is alive

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.