[英]typo3: mysql database not useable
Currently I try to migrate a typo3 based Webserver to a new machine. 当前,我尝试将基于typo3的Web服务器迁移到新计算机上。 (its my first migration, so please don't judge if I did smth wrong).
(这是我的第一次迁移,所以请不要判断我做错了什么)。 What I did so far:
到目前为止,我做了什么:
wget
on new machine wget
在新计算机上传输文件 mysqldumb
mysqldumb
创建dbdump wget
wget
转移转储 mysql source <dumpfile.sql>
mysql source <dumpfile.sql>
创建数据库 When I try to connect with the server, typo3 doesn't response. 当我尝试与服务器连接时,typo3没有响应。 And when I try to install typo3 from skretch and replace the new database with the old one, I also run into internal server errors.
当我尝试从skretch安装typo3并将新数据库替换为旧数据库时,我也遇到了内部服务器错误。 Is there a solution on how to migrate the database correctly?
关于如何正确迁移数据库,有解决方案吗?
Yours Sincerely, 此致,
Sebastian 塞巴斯蒂安
Mh, 嗯
this should not be an issue in general. 通常这不是问题。
We often use following steps: 我们经常使用以下步骤:
MYSQL_PWD="DBPASS" mysqldump -uDBUSER --opt -e -Q --skip-comments --single-transaction=true | gzip >dump.sql.gz
MYSQL_PWD="DBPASS" mysqldump -uDBUSER --opt -e -Q --skip-comments --single-transaction=true | gzip >dump.sql.gz
MYSQL_PWD="DBPASS" mysqldump -uDBUSER --opt -e -Q --skip-comments --single-transaction=true | gzip >dump.sql.gz
tar -czf transfer.tar.gz ./typo-webfolder ./typo3_src-VERSION
tar -czf transfer.tar.gz ./typo-webfolder ./typo3_src-VERSION
tar -xzf transfer.tar.gz
tar -xzf transfer.tar.gz
文件: tar -xzf transfer.tar.gz
gunzip <dump.sql.gz | MYSQL_PWD="DBPASS" mysql -uDBUSER [-hDBHOST] NEWDBNAME
gunzip <dump.sql.gz | MYSQL_PWD="DBPASS" mysql -uDBUSER [-hDBHOST] NEWDBNAME
gunzip <dump.sql.gz | MYSQL_PWD="DBPASS" mysql -uDBUSER [-hDBHOST] NEWDBNAME
touch typo-webfolder/typo3conf/ENABLE_INSTALL_TOOL
touch typo-webfolder/typo3conf/ENABLE_INSTALL_TOOL
Eventually clear the typo3temp folder (can be repopulated by the system) 最终清除typo3temp文件夹(可以由系统重新填充)
In our projects, we are setting the DB Credentials through AdditionalConfiguration.php based on Enviroment Variables (read from a .env file ) 在我们的项目中,我们将基于环境变量(从.env文件读取)通过AdditionalConfiguration.php设置数据库凭据。
So in generell there should not be any issues, but withour more information it is hard to help you further. 因此,在Generell中应该没有任何问题,但是有了更多的信息,很难为您提供进一步的帮助。
Some things: 一些事情:
in general your workflow is usable. 通常,您的工作流程是可用的。 (don't forget the filesystem
fileadmin/
and typo3conf/ext/
) (不要忘记文件系统
fileadmin/
和typo3conf/ext/
)
but there are some traps. 但是有一些陷阱。
be sure to delete the corresponding caches for all changes in filesystem or database. 对于文件系统或数据库中的所有更改,请确保删除相应的缓存。
if you transfer the database: make sure you always use UTF-8 coding of everything! 如果您传输数据库:请确保始终使用所有内容的UTF-8编码!
regarding filesystem: there could be thumbnails or other resized images (folder __processed__/
) but there also are entries in the database for each file and each resizing. 关于文件系统:可能有缩略图或其他调整大小的图像(
__processed__/
文件夹),但数据库中还有每个文件和每个调整大小的条目。
all extensions or configuration are cached in typo3temp/Code/*, also have in mind the autoloader files. 所有扩展名或配置都缓存在typo3temp / Code / *中,请牢记自动加载器文件。
in most cases you can do a clean-up in the install tool. 在大多数情况下,您可以在安装工具中进行清理。
so the first thing should be: 所以第一件事应该是:
start the install tool, do all checks and remove all temporary information. 启动安装工具,进行所有检查并删除所有临时信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.