vagrant / multiple instance mysqld

时间:2015-10-30 16:13:07

标签: mysql vagrant multiple-instances

所以我试图设置一个包含多个mysqld实例的vagrant exact64框,所有mysqld实例都在不同的端口上侦听并使用单独的套接字文件。

我的cnf文件在这里,我认为是正确的所有权和权限

var myColors = [];
for (var ii=0;ii<10;ii++){
myColors.push({value:getRandomColor()});
}

var myHtml = '<table><tr>';

for (var xx=0;xx<10;xx++){

var temp ='<td style="background-color:'+myColors[xx].value+'">Cell     '+xx+'</td>'

myHtml+=temp;
}

myHtml +='</tr><table>'

console.log(myHtml);

var myElement = document.getElementById('content');

myElement.innerHTML = myHtml;



//http://stackoverflow.com/questions/1484506/random-color-generator-in-javascript
function getRandomColor() {
var letters = '0123456789ABCDEF'.split('');
var color = '#';
for (var i = 0; i < 6; i++ ) {
    color += letters[Math.floor(Math.random() * 16)];
}
return color;
}

但是当我尝试启动我的mysqld实例时,我得到了

vagrant@mysqld:~$ sudo ls -la /home/mysql/user.cnf
-rw-r--r-- 1 mysql mysql 3562 Oct 30 13:26 /home/mysql/user.cnf

如果我查看error.log,我发现它抱怨它无法打开文件。

vagrant@mysqld:~$ sudo mysqld_safe --defaults-file=/home/mysql/user.cnf --user=mysql &
[1] 11624
vagrant@mysqld:~$ 151030 16:07:33 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
151030 16:07:33 mysqld_safe Logging to '/var/log/mysql/error.log'.
151030 16:07:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/dbs/user/mysql/data
151030 16:07:33 mysqld_safe mysqld from pid file /var/lib/dbs/user/mysql/mysqld_user.pid ended
谁有任何想法?我已经烧掉太多时间了。

这是我的cnf文件的内容

151030 16:07:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/dbs/user/mysql/data
Could not open required defaults file: /home/mysql/user.cnf
Fatal error in defaults handling. Program aborted
151030 16:07:33 mysqld_safe mysqld from pid file /var/lib/dbs/user/mysql/mysqld_user.pid ended

1 个答案:

答案 0 :(得分:0)

也许是一个很长的镜头,但是如何尝试打开/ home / mysql目录到世界阅读? chmod o+x /home/mysql进行测试?