How to import and export a MySQL database
https://www.a2hosting.com/kb/developer-corner/mysql/import-and-export-a-mysql-database#a-nameprocExportDBaHow-to-export-a-MySQL-database网站迁移:比如换一个主机空间商。
https://docs.cmsmadesimple.org/movingHow to move your CMS Made Simple installation to a new server (method 1)
It is a simple, four step process to move your installation from one server to another.
Step 1
Clear the Cache:
Login to admin, go to Site Admin/System Maintenance and clear the cache. This reduces the number of files you need to copy.
Step 2
Move the Database:
Using PhpMyAdmin, or any other database management software, create a backup/export of your CMSMS database. Use this backup/export to create/import a new database on the new server.
It's important that you leave out the option to "create database" if it is available, as it is unlikely that the destination database name will be he same as the source database name. However, you must ensure that the export file will "create tables".
Step 3
Copy the Files:
Using SSH, your host's control panel, or FTP, copy all of the files from your old site to your new site. Remember to check the permissions for the folders on the new site to ensure they are set correctly, i.e. all cache, uploads and any other folders or sub-folders that need to be writable, are writable.
modules
tmp
tmp/templates_c
tmp/cache
uploads
uploads/images
If using FTP remember to copy all files in "binary" mode. Do not enable auto-file type detection, or ASCII mode.
Step 4
Modify config.php:
In the config.php file on the destination host, find the Database Settings, Path Settings and Image Settings sections and update them with the paths and settings applicable to the new server.
Recent versions of CMSMS use a sparse configuration file. Many paths and URLs if not specified in the configuration file are auto calculated. This means that when moving a site you may only need to change the database connection settings in the config.php. If experiencing problems you can override the auto-calculation by specifying the values in the config.php. See the CMSMS_Config_Reference.pdf file that is included in the docs directory of every installation since CMSMS 1.10 for a reference of config variables and their function.
The path settings are not always that obvious. In your FTP-client it might show something like '/cmsmadesimple' but the real path on the server might be something like e.g.: '/home/content/n/e/e/username/html/cmsmadesimple'. If you have the wrong path, look at the error-message when you try to access your site, that will hint you to the real path settings.
It may be necessary to clear cache again...
phpmyadmin数据库导入的使用方法:phpmyadmin就是一种mysql的管理工具,安装该工具后,即可以通过web形式直接管理mysql数据,而不需要通过执行系统命令来管理,非常适合对数据库操作命令不熟悉的数据库管理者,下面我就说下怎么安装该工具:
1.先到网上下载phpmyadmin,再解压到可以访问的web目录下(如果是虚拟空间,可以解压后通过ftp等上传到web目录下),当然您可以修改解压后该文件的名称。
2.配置config文件
打开libraries下的config.default.php文件,依次找到下面各项,按照说明配置即可:
A.访问网址
$cfg['PmaAbsoluteUri'] = '';这里填写phpmyadmin的访问网址
如:$cfg['PmaAbsoluteUri'] = '
http://www.piaoyi.org/phpmyadmin/'; 这里因为我是本地调试,我改为$cfg['PmaAbsoluteUri'] = '
http://localhost/phpmyadmin/';注意:不要漏掉最后的反斜杠/和开头的http。
B.mysql主机信息
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address
填写localhost或mysql所在服务器的ip地址,如果mysql和该phpmyadmin在同一服务器,则按默认localhost
$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port
mysql端口,如果是默认3306,保留为空即可
C.mysql用户名和密码
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user 访问phpmyadmin使用的mysql用户名
fg['Servers'][$i]['password'] = ''; // MySQL password (only needed对应上述mysql用户名的密码
D.认证方法
$cfg['Servers'][$i]['auth_type'] = 'cookie';
在此有四种模式可供选择,cookie,http,HTTP,config
config方式即输入phpmyadmin的访问网址即可直接进入,无需输入用户名和密码,是不安全的,不推荐使用。
当该项设置为cookie,http或HTTP时,登录phpmyadmin需要数据用户名和密码进行验证,,具体如下:
PHP安装模式为Apache,可以使用http和cookie;
PHP安装模式为CGI,可以使用cookie
我个人建议:无论是本地还是网络上,都建议设置成cookie,安全第一。
E.短语密码(blowfish_secret)的设置
$cfg['blowfish_secret'] = '';
如果认证方法设置为cookie,就需要设置短语密码,置于设置什么密码,由您自己决定 ,但是不能留空,否则会在登录phpmyadmin时提示错误
F.设置默认语言与编码
查找 $cfg['DefaultLang'] = 'zh'; (这里是选择语言,zh代表简体中文的意思) 还有 $cfg['DefaultCharset'] = 'gb2312';(修改默认编码为国标)
好了,到此为止,您已经成功安装了phpmyadmin,简单吧 ,赶快登录体验下吧
说明:
该文档说明的只是安装phpmyadmin的基本配置,关于config.default.php文件中各个配置参数的详细说明可以参考:
http://www.cnblogs.com/vit4/archive/2012/10/26/2741768.html虚拟主机中phpMyAdmin的安装配置方法,请见:
http://www.cnblogs.com/vit4/archive/2012/10/26/2741789.html