Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dbName = substr(md5(time()), 8);
- $host = '172.17.0.6';
- $user = 'root';
- $pass = '';
- try {
- $dbh = new PDO("mysql:host=".$host, $user, $pass);
- $dbh->exec('CREATE DATABASE `' . $dbName . '`') or die(print_r($dbh->errorInfo(), true));
- } catch (PDOException $e) {
- die("DB Error: " . $e->getMessage());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement