Before you run any SQL commands, you must set the variables below. MeekroDB doesn't actually establish a MySQL connection until you run your first command!
DB::$user = 'my_database_user'; DB::$password = 'my_database_password'; DB::$dbName = 'my_database_name'; DB::$host = '126.96.36.199'; //defaults to localhost if omitted DB::$port = '12345'; // defaults to 3306 if omitted DB::$encoding = 'utf8'; // defaults to latin1 if omitted
If you're connecting to MySQL over SSL, you may also need to set these:
DB::$ssl = array('key' => '', 'cert' => '', 'ca_cert' => '', 'ca_path' => '', 'cipher' => ''); DB::$connect_options = array(MYSQLI_OPT_CONNECT_TIMEOUT => 10);
These variables only have an effect when a connection is being established. Once you're connected, changing them has no effect. If you use
DB::disconnect(), you can change these variables. It will then use the new values to re-connect once you run another query.