mysql使用本地db项目中的模式在php中创建新数据库时创建db结构

I have been working on a project on my localhost and I am wanting to use the database structure that my local app is using on my live site. I have done a mysql dump and tried adding it to my pdo db creation script(on live site) but when the db is created their is no structure. Im not sure what im doing wrong and am having trouble finding any examples of it. Im not quite sure what im missing any pointers would be great. Thanks in advance

code ex.

$host="localhost"; 
$root="root"; 
$root_password="root"; 
$user='newuser';

$pass='newpass';
$db= 'companyid' . $companyid; 
    try {
        $dbh = new PDO("mysql:host=$host", $root, $root_password);

        $dbh->exec("CREATE DATABASE `$db`;
                CREATE USER '$user'@'localhost' IDENTIFIED BY '$pass';
                GRANT ALL ON `$db`.* TO '$user'@'localhost';
                FLUSH PRIVILEGES;
                CREATE TABLE IF NOT EXISTS `address` (
  `address` varchar(50) COLLATE latin1_general_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `checkpics`
--

CREATE TABLE IF NOT EXISTS `checkpics` (
  `image` varchar(120) COLLATE latin1_general_ci NOT NULL,
  `amount` decimal(10,0) NOT NULL,
  `date` date NOT NULL,
  `photosmall` varchar(64) COLLATE latin1_general_ci NOT NULL,
  `photobig` longblob NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `customerid` int(10) NOT NULL,
  `checknumber` int(10) NOT NULL,
  `checkamount` varchar(10) COLLATE latin1_general_ci NOT NULL,
  `datepaid` varchar(10) COLLATE latin1_general_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `CityStateZip`
--

CREATE TABLE IF NOT EXISTS `CityStateZip` (
  `city` varchar(30) COLLATE latin1_general_ci NOT NULL,
  `state` varchar(2) COLLATE latin1_general_ci NOT NULL,
  `zip` varchar(10) COLLATE latin1_general_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;") 
        or die(print_r($dbh->errorInfo(), true));

    } catch (PDOException $e) {
        die("DB ERROR: ". $e->getMessage());
    }

Ok I figured out the problem. When creating multiple tables you must run separate commands or use a mysqli multi query command and separate each instance via a ;