s
MySQL_5.5中文参考手册.pdf
http://wiki.cns*****.com/download/attachments/17406236/MySQL_5.5%E4%B8%AD%E6%96%87%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C.pdf?version=1&modificationDate=1404876156000&api=v2
redmine软件下载
https://downloads.bitnami.com/files/stacks/redmine/4.0.4-1/bitnami-redmine-4.0.4-1-linux-x64-installer.run
http://www.redmine.org/releases/redmine-4.0.4.zip
数据库服务器
服务器: Localhost via UNIX socket
服务器类型: MySQL
服务器连接: SSL未被使用 文档
服务器版本: 5.7.26 - MySQL Community Server (GPL)
协议版本: 10
用户: root@localhost
服务器字符集: UTF-8 Unicode (utf8)
网站服务器
Apache
数据库客户端版本: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
PHP 扩展: mysqli文档 curl文档 mbstring文档
PHP 版本: 7.3.6
phpMyAdmin 版本信息: 4.9.0.1
问题1:For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.
For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.
解决1:
1、修改文件
[root@sctssitapp77 ~]# vim /opt/redmine-4.0.4-1/apps/phpmyadmin/conf/httpd-app.conf
修改内容:
原 Require local
新 Require all granted 。
2、重启apache和mysql服务,OK
Bitnami-Redmine外网访问phpmyadmin设置
https://blog.51cto.com/zdytesting/1884969
问题2:MySql 只能访问localhost 和 127.0.0.1访问 不能通过其他IP访问
https://www.cnblogs.com/dwj0931-node/p/5800255.html
redmine 放开外部IP能访问数据库3306端口
解决2:
1、mysql 修改文件
[root@centos7 mysql]# vim /opt/redmine-4.0.4-1/mysql/my.cnf
修改内容
原 bind-address=127.0.0.1
新 bind-address=0.0.0.0
2、进入界面进行执行SQL命令并重启mysql
[root@centos7 ~]# /opt/redmine-4.0.4-1/manager-linux-x64.run
执行命令:grant all privileges on *.* to root@'%' identified by '你的密码';
执行命令:flush privileges;
参考:
问题描述:
项目中跨域请求数据,在远程主机访问本机的MySql时,总是无法连接。本机也只能用localhost和127.0.0.1访问,不可以用192.168.*.*等IP访问。
解决方案:
1.以root用户登陆mysql数据库
mysql -u root -p
2.执行一下命令分配新用户
grant all privileges on *.* to root@'%' identified by 'your root password'; 添加成功之后返回信息:Query OK, 0 rows affected (0.03 sec) 'all privileges ':所有权限 也可以写成 select ,update等。 *.* 所有库的所有表 如 databasename.*。 IP 数据库所在的IP。 identified by ‘密码’ 表示通过密码连接
3.执行完上述命令后用下面的命令刷新一下权限
flush privileges;
4.修改my.conf配置
[mysqld] ... bind_address=127.0.0.1 # 屏蔽掉该处 ... 或者无需屏蔽,修改为
bind_address=0.0.0.0
5.重新启动mysql
启动:输入 net stop mysql 停止:输入 net start mysql
Starting all servers...
Starting MySQL Database...
/opt/redmine-4.0.4-1/mysql/scripts/ctl.sh : mysql started at port 3306
Starting Apache Web Server...
/opt/redmine-4.0.4-1/apache2/scripts/ctl.sh : httpd started at port 80
Starting Subversion Server...
/opt/redmine-4.0.4-1/subversion/scripts/ctl.sh : subversion started at port 3690
navicat mysql
1130 - Host ‘10.49.2.162’ is not allowed connect to this MySQL server
问题3:mysqldump: [Warning] Using a password on the command line interface can be insecure.
未解决3:
https://www.cnblogs.com/wt645631686/p/7832993.html
在阿里云服务器增加一个shell脚本定时备份数据库脚本执行任务时,测试性的执行了备份命令,如下
[root@iZ2ze503xw2q1fftv5rhboZ mysql_bak]# /usr/local/mysql/bin/mysqldump -uroot -pmyServerPwd# dateabase > /data/mysql_bak/bak_test.sql
在执行完了命令本该在指定的目录下出现bak_test.sql文件,然而并没有生成,报了一行错误。这个问题应该是在MySQL5.6+版本的时候就有出现,可能是为了确保数据库的安全性采用的保护机制。
mysqldump: [Warning] Using a password on the command line interface can be insecure.
网上大部分给出的解决方案都是修改mysql的配置文件,给[client]选项增加三行命令
vim /etc/my.cnf
[client] port = 3306 socket = /tmp/mysql.sock default-character-set = utf8mb4 host = localhost //地址 user = root //用户 password = 'myServerPwd' //密码
在增加了三行代码,我习惯性的重启了mysql服务,再同样执行备份命令,发现还是出现错误。
在搜索各种方案的过程中也无意中发现关于此方法在安全性上的一些官方性不足,mysql的官方给出的说明。
https://dev.mysql.com/doc/refman/5.6/en/password-security-user.html?spm=5176.7737807.2.3.D6p7hh
然后针对高版本Mysql备份数据库的解决方案来了,前方高能~~~
命令和以前常用的快速导入和导入命令有所不同了,需要加载我们配置的MYSQL配置文件!
/usr/local/mysql/bin/mysqldump --defaults-extra-file=/etc/my.cnf database > /data/mysql_bak/bak_test.sql //备份导出数据库
/usr/local/mysql/bin/mysql --defaults-extra-file=/etc/my.cnf database < test_db.sql //导入数据库
查看/data/mysql_bak下,发现想要的数据库备份文件出现了~
end