我在linux上部署了一个XAMPP for Linux 1.7.4。将本机上的D:\xampp\mysql\data\下的库文件直接上传到linux的/opt/lampp/var/mysql/下。但当我远程登录xampp页面控制台(http://xxx.xxx.xxx.xx/xampp/),并进入phpMyAdmin后,没发现我的库。可奇怪的是项目却正常使用我现在想在linux的mysql库里改点东西,可在控制台找不到库这时咋回事?后来我又在linux里登录mysql,打show databases;也没发现我的库求帮助!!!

解决方案 »

  1.   

    show variables like 'datadir';检查一下数据文件对应的目录。
      

  2.   

    whereis  mysql
    which mysql
      

  3.   


    目录是对的 都在/opt/lampp/var/mysql/下,
    在linux下进入mysql,use xxx;也能操作各个表,证明我的库是放对位置了,但就是不知道为什么在网页控制台里找不到这是mysql版本:
    服务器: Localhost via UNIX socket
    服务器版本: 5.5.8
    协议版本: 10
    用户: root@localhost 
    MySQL 字符集: UTF-8 Unicode (utf8) 哪位大虾知道咋回事啊。。求教!
      

  4.   

    上次迁移服务器遇到过这情况,是权限没对造成的。phpMyAdmin配置文件和权限你确定都对了哇?
      

  5.   

    <?php
    /*
     * This is needed for cookie based authentication to encrypt password in
     * cookie
     */
    $cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! *//*
     * Servers configuration
     */
    $i = 0;/*
     * First server
     */
    $i++;/* Authentication type and info */
    # commented out by lampp security
    #$cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = '';
    $cfg['Servers'][$i]['extension'] = 'mysql';
    $cfg['Servers'][$i]['AllowNoPassword'] = true;/* User for advanced features */
    $cfg['Servers'][$i]['controluser'] = 'pma';
    # commented out by lampp security
    #$cfg['Servers'][$i]['controlpass'] = '';
    $cfg['Servers'][$i]['controlpass'] = '1234';/* Advanced phpMyAdmin features */
    $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
    $cfg['Servers'][$i]['booktable'] = 'pma_book';
    $cfg['Servers'][$i]['relation'] = 'pma_relation';
    $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
    $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
    $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
    $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
    $cfg['Servers'][$i]['history'] = 'pma_history';
    $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
    $cfg['Servers'][$i]['tracking'] = 'pma_tracking';/*
     * End of servers configuration
     */?>
    这个是config.inc.php的内容,请问我该怎么该?