mysql 5.5 server start up, server client like toad

when i installed mysql5.5 coomand line client it does not start properly. It just comes and closes quickly. are there any detailed instructions on setting mysql and running and connecting using any good database client tool.can i use client tools like toad or sql developer similar to how use for oracle

Please advise.


Any links resources ideas highly appreciated. Thanks in advance
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
Never used MySQL but I would look at the shortcut/icon that opens and closes quickly.  See what command it is executing and try that from a normal command prompt.

You should at least be able to see the error generated.

There are also several links out there that say that SQL Developer can connect to MySQL if you search for them.

There also appears to be a Toad for MySQL:
http://www.quest.com/toad-for-mysql/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dave BaldwinFixer of ProblemsCommented:
If you installed MYSQL in Windows, you need to go to the 'cmd' prompt to use the MySQL command line tool.  You can not use it from the GUI because it will do exactly what you saw.  Go to 'Run' and type in 'cmd', press Enter and you should be at the command line.  Here http://dev.mysql.com/doc/refman/5.5/en/mysql.html are the directions for using 'mysql' command line tool.

You can use Toad (make sure you get the right version), I have it on this computer, but SQL Developer sounds like it is for Microsoft SQL Server.
0
arnoldCommented:
The mysql is a command and if the options you provide are insufficient to open/establish a connection to a mysql server, the command will run, report any errors and exit,  it is the same as if you run netstat -rn outside the command window.

Open a command window, and then run mysql.
If you know the options, mysql -h host_where_mysql -u user -p database
You will be prompted for a password if the account requires a password. If the user does not require a password, exclude the -p option from the above line.

Often a non root user has the database to which the user has access part of the authentication given the default database is mysql (security/system) and often is not accessible by non-administrative/root users.
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

gudii9Author Commented:
on my personal windows vista laptop it works perfect as in the attachment.

The problem i am having is on the office windows 7 laptop. where it does not even show screen to enter password. It comes dark screen and closes in a second and does not even show error message.

>>http://dev.mysql.com/doc/refman/5.5/en/mysql.html






I do not even get mysql shell prompt on office laptop to enter commands as below


>>>Using mysql is very easy. Invoke it from the prompt of your command interpreter as follows:

shell> mysql db_name
Or:

shell> mysql --user=user_name --password=your_password db_name
Then type an SQL statement, end it with “;”, \g, or \G and press Enter.
mysql.jpg
mysql2.jpg
0
arnoldCommented:
Do both systems have a local mysql server install with root that has no password?

IMHO, run cmd.exe then within it run mysql in the same way and you will get the error that details why you are having an issue.
0
gudii9Author Commented:
my personal laptop i gave password as 'root'. once i enter 'root' then click enter i see mysql prompt where i can do all kinds of things like creating databse, tables etc.

But my office laptop does not allow any of them.

>>>If you installed MYSQL in Windows, you need to go to the 'cmd' prompt to use the >>MySQL command line tool.  You can not use it from the GUI because it will do exactly >>what you saw.

How to get mysql prompt. please advise


>>>You can use Toad (make sure you get the right version),


are there are any open source tools which are good ??
0
arnoldCommented:
Start, cmd.exe or command. When the window opens run mysql with the parameters you need and report what errors if any do you get.
0
arnoldCommented:
Get workbench
http://dev.mysql.com/downloads/tools/
There is a free version of toad mysql

These are GUI tools to manage mysql.
Workbench includes several tools, query, mysql admin.
0
gudii9Author Commented:
>>>Start, cmd.exe or command. When the window opens run mysql with the parameters you need



how to run. what parameters i have to give. please advise
0
arnoldCommented:
Cmd.exe only opens the windows command.

When running mysql you need to provide --user=username --password=password_when_set -h mysql_host_if_not_local database

Does the system where you are having this issue have a local mysql server setup?
Are you looking to use this window 7 laptop to access mysql on another system on the network?
0
Dave BaldwinFixer of ProblemsCommented:
This page http://pcsupport.about.com/od/windows7/a/command-prompt-windows-7.htm shows how to open a command prompt in Windows 7.

However, if the database is not on your office windows 7 laptop, you will not be able to access it thru the 'mysql' command line program.  And you will not be able to access it remotely on another computer using 'root' because 'root' is not normally allowed remote access as a security precaution.
0
gudii9Author Commented:
>>Does the system where you are having this issue have a local mysql server setup?
yes
>>Are you looking to use this window 7 laptop to access mysql on another system on the >>network?
no

>>>However, if the database is not on your office windows 7 laptop, you will not be able to access it thru the 'mysql' command line program.


it is on local machine only


I shown in the  attachment i see mysql short cut. when i click it opens dark screen(command prompt kind of screen) and closes in less than a second. I am not getting any error or getting time or opportunity to enter any thing there. please advise
mysql3.jpg
0
Dave BaldwinFixer of ProblemsCommented:
As we told you above, you must open the Windows command line first before you run the 'mysql' program on the command line.  Since you are Not doing that, you will always get the response you are seeing.

Are you saying that you have MySQL databases on both laptops, not just on one?
0
gudii9Author Commented:
>>Are you saying that you have MySQL databases on both laptops, not just on one?

yes.

Both personal and office laptop i installed mysql similar way. There is no relation between these tow laptops anyway though.


>>>As we told you above, you must open the Windows command line first before you run the 'mysql' program on the command line.  Since you are Not doing that, you will always get the response you are seeing.



what command i have to give after opening 'windows command line'

let us say i have usernae as xyz and password as 'pwd' for the mysql database running on my office laptop local environment. please advise
0
Dave BaldwinFixer of ProblemsCommented:
When you have the Windows command line on your screen, you can use the same commands as on your other computer.  
mysql --user=xyz --password=pwd
OR
mysql -u xyz -ppwd

Open in new window

Note that there is No space after '-p' for the password.
http://dev.mysql.com/doc/refman/5.5/en/mysql.html
0
arnoldCommented:
In the start, right click n the short cut, and select properties.

You need to add the --user=username --password=password

That may make the shortcut work, the problem with triggering the mysql client as you are trying is that you will not see what the error is because the window will close
0
gudii9Author Commented:
In the start, right click n the short cut, and select properties.

You need to add the --user=username --password=password



when i right click i see popup with 4 tabs. It opened with shortcut tab

says
Start in--->"C:\Program Files\MySQL\MySQL Server 5.1\bin\"

I have to add -->--user=username --password=password
at the end??

like

"C:\Program Files\MySQL\MySQL Server 5.1\bin\" --user=username --password=password


please advise
0
arnoldCommented:
General tab, not sure which tab has the program info.
If there is no option to edit the command: "c:\program files\Mysql\mysql server 5.1\bin\mysql.exe" "--username=username" "--password=password"

If you can not change this, you can not use the shortcut directly.
0
gudii9Author Commented:
when i give those commands on my office laptop i am getting as below

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\iiii>mysql --user=xyz --password=pwd
'mysql' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\iiii>mysql -u xyz -ppwd
'mysql' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\iiii>


while installing mysql earlier on office machine it did not install properly i guess and it never asked me to give me user name, password any time. I do not have all admin rights on this laptop. Not sure if i need all admin rights to install mysql. How do i ensure my mysql installation went through successfully?

Do you see that could be issue why it says

'mysql' is not recognized as an internal or external command,
operable program or batch file.

please advise
0
slightwv (䄆 Netminder) Commented:
Make sure the PATH to MySQL has been added to the system path or fully qualify it.

The following link shows how to add items to the environments PATH:

http://www.devarticles.in/miscelleneous/fixing-mysql-is-not-recognized-as-an-internal-or-external-command-in-windows7/
0
gudii9Author Commented:
i changed the path as given in the path. now when i type

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\iiii>mysql -version
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

C:\Users\iiii>mysql -u xyz -ppwd
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)



Please advise
0
slightwv (䄆 Netminder) Commented:
Is MySQL Server running?  try starting it with mysqld.exe.
0
gudii9Author Commented:
to change path i have to go indirect way--->Control Panel\User Accounts\User Accounts then 'change my environment variables'


hen i click mysqld.exe then dark screen comes for a fraction of second and then disappears right away. when i say

C:\Users\iiii>mysql -u xyz -ppwd
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)



Please advise
0
slightwv (䄆 Netminder) Commented:
Just like the MySQL executable:  Don't double click!  Run it from a CMD prompt.  This way you can see the error messages...
0
gudii9Author Commented:
It says now

C:\Program Files\MySQL\MySQL Server 5.5\bin>mysqld.exe
131008 14:18:52 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Se
rver 5.5\data\LB3280D36.lower-test
131008 14:18:52 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Se
rver 5.5\data\LB3280D36.lower-test
131008 14:18:52 [Note] Plugin 'FEDERATED' is disabled.
131008 14:18:52 InnoDB: The InnoDB memory heap is disabled
131008 14:18:52 InnoDB: Mutexes and rw_locks use Windows interlocked functions
131008 14:18:52 InnoDB: Compressed tables use zlib 1.2.3
131008 14:18:52 InnoDB: Initializing buffer pool, size = 128.0M
131008 14:18:52 InnoDB: Completed initialization of buffer pool
131008 14:18:52  InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .\ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.



please advise
0
slightwv (䄆 Netminder) Commented:
>>InnoDB: The error means mysqld does not have the access rights to
>>InnoDB: the directory. It may also be you have created a subdirectory
>>InnoDB: of the same name as a data file.

Looks like a file permission error.

When you opened the CMD prompt, did you 'run as administrator'?

Right click on the CMD icon and there should be an option to do this.
0
gudii9Author Commented:
>>Right click on the CMD icon and there should be an option to do this

when i do that asking my office username and password to login, when i gave erroring out as below

it says requested operation needs elevation

Please advise
0
slightwv (䄆 Netminder) Commented:
Just guessing that MySQL needs admin level permissions to run.

It's a guess because I've never installed the product or used it.

You can possible try having it create the database in a folder you have read/write access on.

I would have to refer you to the docs for MySQL on how to do this if it is possible.
0
Dave BaldwinFixer of ProblemsCommented:
I would try to re-install MySQL and use 'Run as Administrator' this time.
0
gudii9Author Commented:
>>You can possible try having it create the database in a folder you have read/write access on.




How do i install in other folder other than program files. It is by default installing at program files without asking me to choose any other folder. Please advise
0
slightwv (䄆 Netminder) Commented:
re: http:#a39556598

I would have to refer you to the docs for MySQL on how to do this if it is possible.
0
gudii9Author Commented:
hmm.. i could not find that info anywhere
0
slightwv (䄆 Netminder) Commented:
A quick Google provides the Installation Guide for MySQL on Windows:
http://dev.mysql.com/doc/refman/5.1/en/windows-installation.html

Looks like you need admin rights to install it.  

Generally, you should install MySQL on Windows using an account that has administrator rights. Otherwise, you may encounter problems with certain operations such as editing the PATH environment variable or accessing the Service Control Manager. Once installed, MySQL does not need to be executed using a user with Administrator privileges.

When you installed it, did you do so as a Windows Service?  If so, make sure that service is running.  Then try the mysql command again.


Here is the doc link on how to install it as a service:
http://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.