简体   繁体   English

typo3:无法使用mysql数据库

[英]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: 到目前为止,我做了什么:

  • transfer Files via wget on new machine 通过wget在新计算机上传输文件
  • create dbdump with mysqldumb mysqldumb创建dbdump
  • transfer dump with wget wget转移转储
  • create database with mysql source <dumpfile.sql> 使用mysql source <dumpfile.sql>创建数据库
  • create user with access to the db 创建有权访问数据库的用户

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: 我们经常使用以下步骤:

  • [SRC] BackupDatabase: MYSQL_PWD="DBPASS" mysqldump -uDBUSER --opt -e -Q --skip-comments --single-transaction=true | gzip >dump.sql.gz [SRC] BackupDatabase: 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
  • [SRC] Pack the installation and the used core: tar -czf transfer.tar.gz ./typo-webfolder ./typo3_src-VERSION [SRC]打包安装和使用的核心: tar -czf transfer.tar.gz ./typo-webfolder ./typo3_src-VERSION
  • Transfer both .gz files to new server (wget, scp, ftp etc ) 将两个.gz文件都传输到新服务器(wget,scp,ftp等)
  • [NEW] Deflate files: tar -xzf transfer.tar.gz [NEW] tar -xzf transfer.tar.gz文件: tar -xzf transfer.tar.gz
  • [NEW] Create a empty database, using your fav tool [NEW]使用您的收藏夹工具创建一个空数据库
  • [NEW] Import database: gunzip <dump.sql.gz | MYSQL_PWD="DBPASS" mysql -uDBUSER [-hDBHOST] NEWDBNAME [NEW]导入数据库: gunzip <dump.sql.gz | MYSQL_PWD="DBPASS" mysql -uDBUSER [-hDBHOST] NEWDBNAME gunzip <dump.sql.gz | MYSQL_PWD="DBPASS" mysql -uDBUSER [-hDBHOST] NEWDBNAME
  • [NEW] Adjust DatabaseCredentials in `typo3conf/LocalConfiguration.php' [NEW]在typo3conf / LocalConfiguration.php中调整DatabaseCredentials
  • [NEW] Recheck symlinks (typo3_src, typo3, index.php) [NEW]重新检查符号链接(typo3_src,typo3,index.php)
  • [NEW] Recheck .htaccess files - maybe missed to pack and transfer ? [NEW]重新检查.htaccess文件-也许错过了打包和传输?
  • [NEW] Create FlagFile touch typo-webfolder/typo3conf/ENABLE_INSTALL_TOOL [NEW]创建FlagFile touch typo-webfolder/typo3conf/ENABLE_INSTALL_TOOL
  • [NEW] Open install tool in Webbrowser ( http://newdomain.tld/typo3/install ), checking requirements, maybe fixing folderstructure and so on, clearing all caches [NEW]在Webbrowser中打开安装工具( http://newdomain.tld/typo3/install ),检查要求,也许修复文件夹结构等等,清除所有缓存

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: 一些事情:

  • Proxy/TrustedProxy settings 代理/受信任代理设置
  • DomainRecord Settings in the Database ( sys_domain ) 数据库中的DomainRecord设置(sys_domain)
  • RealUrl Config With DomainName based settings 具有基于域名的设置的RealUrl Config
  • .htaccess Canonical rewrite rules based on domain/hostname .htaccess基于域/主机名的规范重写规则
  • Missing needed php modules etc., wrong php version, checking php error log 缺少所需的php模块等,错误的php版本,检查php错误日志

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM