-2

我安装了 uWamp 3.1.0 但 php 版本相当旧。我可以使用此处找到的说明将 PHP 更新到 7.4.4。我尝试将 mariadb 10.4 与 bin\database\mariadb-10.4.12 中的 32 位版本对接并从旧的 mysql 5 文件夹中复制 my_uwamp.ini,但引擎没有启动。有什么提示吗?

4

2 回答 2

0

感谢您提供宝贵的信息!

实际的 MariaDB 分布不接受 [log-slow-queries] 参数。相反,支持 [slow_query_log]。

因此,工作模板将是:

##################
#
# Lots more settings can be configured from 
# https://mariadb.com/kb/en/server-system-variables/
# Based on mariaDB 10.x and above
#
# When uwamp loads it will create the my.ini in the root mariadb directory and substitute the variables for the correct paths

# The MariaDB server
[mariadb]

# Directory where you want to put your data

datadir={MYSQLDATAPATH}
# Directory for the errmsg.sys file in the language you want to use
language={MYSQLPATH}/share/english

# This is the prefix name to be used for all log, error and replication files
log_basename=mariadb-error
log_error={MYSQLPATH}/mariadb-errors.log
# Enable logging by default to help find problems
general_log
slow_query_log
##################
于 2020-08-19T12:48:36.513 回答
0

如果 uwamp 正在运行,请停止服务并关闭。

在撰写本文时,我将参考稳定的 10.4.12 版本下载您要使用的 mariadb 版本。下载 .zip 版本而不是安装程序。

https://downloads.mariadb.org/interstitial/mariadb-10.4.12/win32-packages/mariadb-10.4.12-win32.zip/from/http%3A//ftp.heanet.ie/mirrors/mariadb/

进入你安装的uwamp目录,点击进入bin/database目录创建mariadb-10.4.12的目录/文件夹名展开文件到这个目录

您现在需要将 mysql-5.7.11 的数据目录复制到 mariadb-10.4.12

这是由于 uwamp 创建了特殊用户来关闭 sql server

现在创建一个名为 my_uwamp.ini 的文件,并使用您喜欢的文本编辑器将其保存在 mariadb-10.4.12 目录中

复制下面################## 之间的文本并保存为 my_uwmap.ini

''''    
##################
#
# Lots more settings can be configured from 
# https://mariadb.com/kb/en/server-system-variables/
# Based on mariaDB 10.x and above
#
# When uwamp loads it will create the my.ini in the root mariadb directory and substitute the variables for the correct paths

# The MariaDB server
[mariadb]

# Directory where you want to put your data

datadir={MYSQLDATAPATH}
# Directory for the errmsg.sys file in the language you want to use
language={MYSQLPATH}/share/english

# This is the prefix name to be used for all log, error and replication files
log_basename=mariadb-error
log_error={MYSQLPATH}/mariadb-errors.log
# Enable logging by default to help find problems
general_log
log-slow-queries

##################
''''        

这是uwamp在启动时查找的配置文件,然后替换变量并保存为mariadb-10.4.12目录下的my.ini

您将需要更新 phpmyadmin 应用程序,该应用程序存储在 /uwamp/phpapps 目录中

下载最新的phpmyadmin包 https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.zip

将 /uwamp/phpapps/phpmyadmin 目录重命名为 phpmyadmin-old 或 phpmyadmin.old 创建一个新的 phpmyadmin 目录并将文件展开到 phpmyadmin 目录中

加载 uwamp 并在 sql 下拉列表中选择 mariadb。日志窗口中不应报告任何错误。

最后点击MYSQL Config按钮

保留旧密码为 root 新密码为 -> root 重新输入密码为 -> root

单击确定按钮。请耐心等待保存完成,这只是为了更新 uwamp 用户以协助关机。

现在默认的 myphpadmin 访问应该设置为用户名 root 和密码 root

你应该很高兴去!如果有任何问题,请在此处给我们留言 :)

于 2020-04-02T16:58:05.003 回答