[plug] MySQL and SQL queries

Weirdo linuxalien at optusnet.com.au
Sat Jul 5 12:04:10 WST 2003


I picked up some tutorials on MySQL shell commands and the like. I aim to 
use a gui at some later stage when the results of quiries need to be easy 
to use. My main want at the moment is to learn howto use quries and the such.
See below for a mysql attempt with and without root access. nmaa is a 
database. nmaa was created as root, if i try to create a database running 
mysql as a non-root user I get access denied.
Thanks
Tim
-----------------------------------------------------------------------
>Welcome to Knoppix (Kernel 2.4.20-xfs)
>
>tim at linmediabox:~$ mysql
>Welcome to the MySQL monitor.  Commands end with ; or \g.
>Your MySQL connection id is 18 to server version: 3.23.52-log
>
>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
>mysql> use nmaa
>ERROR 1044: Access denied for user: '@localhost' to database 'nmaa'
>mysql> use test
>Database changed
>mysql> Bye
>tim at linmediabox:~$ sudo mysql
>Welcome to the MySQL monitor.  Commands end with ; or \g.
>Your MySQL connection id is 19 to server version: 3.23.52-log
>
>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
>mysql> use test
>Database changed
>mysql> use nmaa
>Reading table information for completion of table and column names
>You can turn off this feature to get a quicker startup with -A
>
>Database changed
>mysql> Bye
>tim at linmediabox:~$
-----------------------------------------------------------------------

At 22:20 04/07/2003 +0800, you wrote:
> > Also the only user that can access the MySQL database is root. i.e. the
> > program trying to access the database (MySQL navigator, tora...) has to be
> > running as root.
>Ouch. You may also find that root has no password. A worrying default in the
>install. Check out the documentation at
>http://www.mysql.com/doc/en/Security.html
>Also for user accounts see
>http://www.mysql.com/doc/en/User_Account_Management.html
>The documentation is very good.
>
> > As I am steering away from GUIs  i would like to know how to access the
> > database and issue queries ... using a command line program (Direct server
> > term?)
>Once you log on to mysql you can use that command line, however don't 
>discount
>the GUI model out of hand.
>I have found MySQLCC to be very handy.
>The SQL editor allows you to write SQL queries, display the results and then
>adjust the query until you get it right.
>Also GUI builders, like that included in OpenOffice.org can give you an idea
>of what the query might look like in general terms. OpenOffice.org also has a
>good SQL editor, but the ODBC driver has a few quirks.
>MySQLCC is available from
>http://www.mysql.com/products/mysqlcc/index.html
>
>Good luck, you have made an informed choice.
>
>Love
>Mike.

weirdo at linuxalien.tk
Dot TK ambassador #24084 - For a free .tk domain please contact me

ICQ# 255176389
MSN weirdo at linuxalien.tk

Riverton, Perth, WA



More information about the plug mailing list