• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1763
  • Last Modified:

Connect to MySQL via MySQLWorkBench or SQL Developer

I need to update a production application written in Perl. The Perl program connects to a MySQL database via this command:
my $dbh = DBI->connect("DBI:mysql:database=www;host=localhost", "www", "myPWD", {'RaiseError' => 1});

I copied the above line from a working application. I only changed the password value to myPWD. I want to logon to the MySQL server via MySQL client but I cannot:

I logon to the server (Sun Solaris 10) where the Perl code resides and there I become root:
# id
uid=0(root) gid=1(other)
#which mysql
/usr/misc/bin/mysql
#/usr/misc/bin/mysql myPWD -u www -pmyPWD www
I can connect to the database.


But when I use MySQL WorkBench I cannot connect -- I get attached error.

Now I try to connect to the MySQL database via SQL developer. There I can connect but the window does not let me choose the database name.
I can see the tables under the database name "www" but I cannot query -- error shows "No Database selected".
I attached snap. How could I connect to the database via MySQL Workbench or via SQL developer and query successfully? MySQLworkBench Error SQL developer error
0
toooki
Asked:
toooki
  • 5
  • 5
1 Solution
 
ramkihardyCommented:
Use this command before the "Select * from groups query"
Use Database name;
the write your query
Select * from groups query;
Hope this helps.....
let me know if you want any help..further
0
 
Dave BaldwinFixer of ProblemsCommented:
You could look for an old version of MySQL Workbench.  Workbench 5.0.30 is still available from MySQL http://dev.mysql.com/downloads/workbench/5.1.html#downloads .  You will probably have to select it from the links and dropdowns.

phpmyadmin is probably one of the most widely used ways to manage MySQL databases.  It does require a server to run PHP but WAMP and XAMPP are easy to install on Windows.
0
 
toookiAuthor Commented:
Thank you.
My current MySQLWorkBench version is 5.2.30 CE.
If I download 5.0.30 it will erase the 5.2.30 CE version. I use MySQLWorkBench to connect to other SQL server databases too. So I do not know how I could install another version on the server.

Otherwise can I install phpmyadmin on a Solaris 10 server?

use www;
The above command work when I try from sql client on sql prompt on my windows XP PC.
sql>use www;
But I wanted to use this on Oracle Developer IDE.
Very strangely unlike other MySQL database -- this does not let me select the database name when I create the connection to the MySQL database from the Oracle Developer.  I attached the screen-shot -- it does not show up in the pull-down items.
If I type in use www
I get error -- I attached the screen-shot. Oracle SQL developer New connection error
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Dave BaldwinFixer of ProblemsCommented:
As noted in your first error message, the MySQL database you're trying to connect to is 'pre-4.1.1'.  '4.1.1' is the point where they changed some access procedures.  MySQL doesn't support anything before MySQL 5 now.  In addition, PHP 5.3 doesn't either because it uses the current 'connector' from MySQL for it's functions.

This page http://dev.mysql.com/doc/refman/5.5/en/old-client.html talks about the change and suggests a way to 'fix' it.  Some people have found that it disables the old MySQL server to do so so be careful.
0
 
toookiAuthor Commented:
Thank you.
I installed MySQLWorkbench on a separate Windows PC. This time I installed version 5.0.30.
But this version does not have an option to connect to a database, which is strange.

I attached screen-shots.
0
 
toookiAuthor Commented:
Thank you.
I installed MySQLWorkbench Version 5.0.30 on a different Windows PC but very strange -- it does not have option to connect to a database.
Under the database tab I do not see option for new connection.
I attached screen-shots. screen screen
0
 
Dave BaldwinFixer of ProblemsCommented:
Turns out that I have a very old version of the MYSQL GUI Tools (version 1.28!) and it will connect to a MySQL 4.0.25 database I use.  The connections are setup in MySQL Administrator.  I think that should have been part of the installation for MySQL Workbench.  So open up MySQL Administrator and it should ask you for the connection info.
0
 
toookiAuthor Commented:
Thank you.
For the "old version of the MYSQL GUI Tools" is it the MySQLworkbench or some other IDE? For MySQLworkbench 5.0.30 is the oldest version that I can download...
0
 
Dave BaldwinFixer of ProblemsCommented:
I went looking and couldn't find the file I downloaded or an old version of the MySQL GUI Tools anywhere.  I'm still looking.  I hardly ever get rid of the programs I download.
0
 
toookiAuthor Commented:
Thank you.
I think I should give up on the IDE option. I could connect to the mySQL database via MySQL client. So I am ok. Thank you for all the information.
0
 
Dave BaldwinFixer of ProblemsCommented:
Glad you got it working.  Thanks for the points.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now