我很长一段时间以来一直是MySQL的用户.我想开始使用最流行的叉子之间的所有不同的变化.问题是我找不到它们之间的任何好的比较,我最终只会尝试所有这些.我关心的是生产,因为我不会在生产中试验所有这些叉子.
你有没有在生产中运行任何MySQL分支?
有什么好处?有什么缺点?
我已经设置了两个在两个私有IP 192.168.2.51和192.168.2.52上运行的MariaDB 10.0 Galera集群节点.我将尝试使用MariaDB网站提供的MariaDB的JDBC Client(org.mariadb.jdbc.Driver)尝试连接到集群.
它使用常规URL,如:"jdbc:mariadb://192.168.2.51:3306,192.168.2.52:3306/dbname".
但我想要实现的是MySQL JDBC驱动程序的可能性,其URL为:"jdbc:mysql://192.168.2.51,192.168.2.52/dbname?autoReconnect = true&autoReconnectForPools = true&failoverReadonly = false&roundRobinLoadBalance = true"
我比较了MariaDB(https://mariadb.com/kb/en/about-the-mariadb-java-client/)和MySQL(http://dev.mysql.com/doc/refman/5.5)中所述的属性./en/connector-j-reference-configuration-properties.html).对于MariaDB JDBC Client,它似乎没有处理loadbalance或autoReconnect的属性.
所以我的问题是:是否有正确的建议方式通过MariaDB JDBC驱动程序连接(具有负载均衡和故障转移功能)到MariaDB Galera,还是应该回到MySQL的ConnectorJ以及ConnectorJ与MariaDB Galera集群的兼容性如何?
谢谢.
我刚在Mac上通过自制软件安装了MariaDB.在安装结束时,我收到以下错误:
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mariadb`
Run Code Online (Sandbox Code Playgroud)
如果我跑,brew postinstall mariadb我得到:
==> /usr/local/Cellar/mariadb/5.5.34/bin/mysql_install_db --verbose --user=andrew --basedir=/usr/loca
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria
Please check all of the above before mailing us! And remember, if
you do mail us, you should use the /usr/local/Cellar/mariadb/5.5.34/scripts/mysqlbug script!
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
Run Code Online (Sandbox Code Playgroud)
哪个没用!我跟着的教程告诉我跑unset TEMPDIR,然后mysql_install_db --user=mysql --basedir=$(brew --prefix mariadb); 运行以下结果:
/usr/local/opt/mariadb/bin/my_print_defaults: …Run Code Online (Sandbox Code Playgroud) 我的模特:
class Course(models.Model):
language = models.ForeignKey(Language)
name = models.CharField(max_length=50, unique=True, default='course')
title = models.CharField(max_length=1024, default='no title')
foreign_title = models.CharField(max_length=1024, default='no title', blank=True)
header = models.CharField(max_length=1024, default='', blank=True)
description = models.TextField(null=True, blank=True)
def __str__(self):
return self.title
def __unicode__(self):
return u'%s' % self.title
Run Code Online (Sandbox Code Playgroud)
我添加"unique_together":
class Course(models.Model):
language = models.ForeignKey(Language)
name = models.CharField(max_length=50, unique=True, default='course')
title = models.CharField(max_length=1024, default='no title')
foreign_title = models.CharField(max_length=1024, default='no title', blank=True)
header = models.CharField(max_length=1024, default='', blank=True)
description = models.TextField(null=True, blank=True)
class Meta:
unique_together = ['language', 'name', 'title']
def …Run Code Online (Sandbox Code Playgroud) 以下陈述有什么问题?
ALTER TABLE submittedForecast
ADD CONSTRAINT FOREIGN KEY (data) REFERENCES blobs (id);
Run Code Online (Sandbox Code Playgroud)
我得到的错误信息是
Can't create table `fcdemo`.`#sql-664_b` (errno: 150 "Foreign key constraint is incorrectly formed")
Run Code Online (Sandbox Code Playgroud) 如何判断我连接的服务器是Percona还是MySQL或MariaDB?这样做有什么标准方法吗?我目前正在使用SHOW VERSION测试服务器版本,但我还需要在我正在处理的应用程序中显示服务器名称.
我在Ubuntu LTS 16.04上安装了MariaDB.然后我跑了
/usr/bin/mysql_secure_installation
Run Code Online (Sandbox Code Playgroud)
并设置root密码.通过访问数据库mysql -u root -p工作正常.但是检查状态会service mysql status打开一个包含此警告的日志文件:
[Warning] 'user' entry 'root@localhost' has both a password and an authentication plugin specified. The password will be ignored.
Run Code Online (Sandbox Code Playgroud)
问题是:
我在具有Mariadb(使用readline 5.2的debian-linux-gnu(i686)的mysql Ver 15.1 Distrib 10.0.29-MariaDB,使用readline 5.2)的nodejs(v6.11.0)应用程序上使用Sequelize版本4.3.0。当应用程序启动并调用函数时:
Sequelize.sync();
然后,sequelize连接管理器引发以下错误:
未处理的拒绝SequelizeConnectionError:客户端不支持服务器请求的身份验证协议。考虑升级MariaDB客户端
at Utils.Promise.tap.then.catch.err (/home/dariksoft/cars/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:146:17)
at tryCatcher (/home/dariksoft/cars/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/dariksoft/cars/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/dariksoft/cars/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/dariksoft/cars/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/dariksoft/cars/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/home/dariksoft/cars/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/dariksoft/cars/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/home/dariksoft/cars/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
Run Code Online (Sandbox Code Playgroud)
我更新了mariadb-server和mariadb-client,但是问题已经存在!
有人可以帮助我解决这个问题吗?
我正在使用MariaDB构建Django应用程序的基于Alpine的图像,但我无法弄清楚应该添加哪个依赖项,以便我的应用程序可以正确连接到数据库。Dockerfile
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
Run Code Online (Sandbox Code Playgroud)
好吧,我以为我做到了。从我在这篇文章中读到的,在这个讨论中,mariadb-dev在Alpine中相当于default-libmysqlclient-dev在基于Debian的系统中。此外,Alpine 中的mysql-client 包只是一个虚拟包(包含mariadb-dev、mariadb-client等)。这是Dockerfile:
# pull official base image
FROM python:3.7-alpine
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# set work directory
WORKDIR /usr/src/cms
# install mysqlclient
RUN apk update \
&& apk add --virtual build-deps gcc python3-dev musl-dev \
&& …Run Code Online (Sandbox Code Playgroud)