Mysql tutorial, mysql tutorial, mysql and java tutorial, using mysql, mysql lessons, mysql,mysql tips,mysql cheat sheet!
Sycorax - complete tutorials
Programming Tutorials
" Java provides the industry - software companies and customer alike , an opportunity to create a true open computing environment where software is portable,
and customers benefit from increase competition. "
Java and the Future
December 1, 2008-LEJB 3.1: EJB New and Improved!
The EJB 3.0 specification was a huge improvement from what you were used to in the early versions of EJB. Available as an early draft, EJB 3.1 has many more features and is even easier to use.
December 1, 2008-Should Java Assert that Network I/O Can't Occur on the UI Thread?
Doing network I/O on the user interface (UI) thread is bad. Most developers know that and can tell you why; unfortunately, it's still done.
Register now to recieve special alert and latest technology news!
Connecting to and Disconnecting from the Server
To connect to the server, you will usually need to provide a MySQL user name when you invoke mysql and a password. If the server runs on a machine other than the one where you log in, you will also need to specify a host name.
In windows from the command prompt give the command
mysql -u root -p mysql
(here root is the username and mysql is the password)
After that it will show - mysql>
After you have connected successfully, you can disconnect any time by typing QUIT (or \q) at the mysql> prompt:
mysql> QUIT
Bye
Here's a simple command that asks the server to tell you its version number and the current date. Type it in as shown here following the mysql> prompt and press Enter:
mysql> SELECT VERSION(), CURRENT_DATE;
+----------------+--------------+
| VERSION() | CURRENT_DATE |
+----------------+--------------+
| 5.0.7-beta-Max | 2009-01-12 |
+----------------+--------------+
1 row in set (0.01 sec)
mysql>
You can even enter multiple statements on a single line. Just end each one with a semicolon:
mysql> SELECT VERSION(); SELECT NOW();
+----------------+
| VERSION() |
+----------------+
| 5.0.7-beta-Max |
+----------------+
1 row in set (0.00 sec)
+---------------------+
| NOW() |
+---------------------+
| 2009-01-12 17:59:36 |
+---------------------+
1 row in set (0.00 sec)
To Know the current user logged in to the mysql database.
mysql> SELECT USER()
-> ;
+---------------+
| USER() |
+---------------+
| sts@localhost |
+---------------+

