【问题标题】:updating mysql with latest mariadb用最新的 mariadb 更新 mysql
【发布时间】:2020-03-26 18:17:18
【问题描述】:

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

【问题讨论】:

  • 除非您的 RAM 小于 4GB 和 32 位操作系统,否则不要使用 32 位版本。

标签: mariadb uwamp


【解决方案1】:

如果 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

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

【讨论】:

    【解决方案2】:

    感谢您提供宝贵的信息!

    实际的 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-06-27
      • 2015-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-19
      • 2019-09-02
      • 1970-01-01
      • 2013-03-20
      相关资源
      最近更新 更多