DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 1st April 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,131
Default Show default MySQL database

With MySQL you can easily switch between databases. The following SQL snippet allows you to make sure that you are working with the correct database:
Code:
-- MySQL show current, default or database in use ...

select "Current database in use ...." 
 union
select database() ;
Example:
Code:
mysql> source show-use ;
+------------------------------+
| Current database in use .... |
+------------------------------+
| Current database in use .... |
| Siralas2013                  |
+------------------------------+
2 rows in set (0.00 sec)

mysql> use Siralas2012 ;
Database changed

mysql> source show-use ;
+------------------------------+
| Current database in use .... |
+------------------------------+
| Current database in use .... |
| Siralas2012                  |
+------------------------------+
2 rows in set (0.00 sec
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
 

Tags
mysql default database

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL database import not helpful J65nko General software and network 2 10th December 2011 02:45 AM
Read Excel Data and store into Mysql Database using PHP cksraj Programming 2 3rd June 2009 12:09 PM
Roundcube Mail Can't Connect to MYSQL Database jrs665 OpenBSD Packages and Ports 1 17th November 2008 03:54 PM
mplayer do not show subtitle mfaridi OpenBSD Packages and Ports 3 12th November 2008 05:41 AM
Changing encoding of text in MySQL database stukov Programming 5 15th July 2008 09:48 PM


All times are GMT. The time now is 09:14 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick