PHP MySql Web Hosting

PHP and MySQL Web Development

% mysql -h host -p -u user cookbook

Filed under: MySQL Solutions — webmaster @ 9:32 am

% mysql -h host -p -u user cookbook If you’ve already started a mysql session, you can select a database (or switch to a different one) by issuing a USE statement: mysql> USE cookbook; Database changed If you’ve forgotten or are not sure which database is the current one (which can happen easily if you’re using multiple databases and switching between them several times during the course of a mysql session), use the following statement: mysql> SELECT DATABASE( ); +————+ | DATABASE() | +————+ | cookbook | +————+ DATABASE( ) is a function that returns the name of the current database. If no database has been selected yet, the function returns an empty string: mysql> SELECT DATABASE( ); +————+ | DATABASE() | +————+ | | +————+ The STATUS command (and its synonym, s) also display the current database name, in additional to several other pieces of information: mysql> s Connection id: 5589 Current database: cookbook Current user: cbuser@localhost Current pager: stdout Using outfile: ‘’ Server version: 3.23.51-log Protocol version: 10 Connection: Localhost via UNIX socket Client characterset: latin1 Server characterset: latin1 UNIX socket: /tmp/mysql.sock Uptime: 9 days 39 min 43 sec Threads: 4 Questions: 42265 Slow queries: 0 Opens: 82 Flush tables: 1 Open tables: 52 Queries per second avg: 0.054

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP MySQL Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by PHP MySQL Web Hosting