Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 5: Line 5:  
[[File:Mysql.png]]
 
[[File:Mysql.png]]
 
</blockquote>
 
</blockquote>
 
+
__TOC__
 
== Description ==
 
== Description ==
   Line 40: Line 40:  
== Command line ==
 
== Command line ==
 
For your convenience, aliases have been added :  mysql55, mysqlshow55, mysqladmin55, mysqldump55, mysqlimport55 and mysqlbinlog55
 
For your convenience, aliases have been added :  mysql55, mysqlshow55, mysqladmin55, mysqldump55, mysqlimport55 and mysqlbinlog55
 +
 +
Assuming you have a wordpress database setup, the following will connect to database wordpress in mysql55 server, and present the mysql prompt so you can work with the database.
    
  mysql55 wordpress
 
  mysql55 wordpress
   −
will connect you to database wordpress in  mysql55 server, and let you with the mysql prompt to work.
+
However the full command line to access, per instance to mysql55 server with the mysql client against its version would be :
    +
mysql55
 +
 +
Alternatively:
   −
However the full command line to access, per instance to mysql55 server with the mysql client against its version would be :
   
If you need to work with this version of MySql on the command line you will have to specify the right socket.
 
If you need to work with this version of MySql on the command line you will have to specify the right socket.
   Line 62: Line 66:  
By default mysql55 uses a socket for connections.
 
By default mysql55 uses a socket for connections.
   −
Depending on your application syntax the socket can be found at like this (localhost can be replaced with 127.0.0.1 if needed):
+
PHP applications that are aware of sockets are few, and most typically try to connect to a port. You will have to craft a way to define the one you want to use for your particular app. Some let you put it in a variable, some will just need you to add it after the hostname or ip (localhost:3309), some will just assume 3306 and just ignore anything else.
    
* localhost:/var/lib/mysql/mysql55.sock
 
* localhost:/var/lib/mysql/mysql55.sock
Line 69: Line 73:  
PHP applications that are aware of sockets are few, and most of them will try to connect to a port. To enable mysql55 to use a port you will need to do the following:
 
PHP applications that are aware of sockets are few, and most of them will try to connect to a port. To enable mysql55 to use a port you will need to do the following:
   −
  config setprop mysq55-mysql LocalNetworkingOnly no
+
  config setprop mysql55-mysqld port 3307 LocalNetworkingOnly no
 
  signal-event post-upgrade;signal-event reboot
 
  signal-event post-upgrade;signal-event reboot
  

Navigation menu