-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to mySQL5.7, Ruby warning reductions, .md file updates (#355)
* delete old rails configurations * update pr template * update readme and docker image name * add a mysql setup file * update broken recaptcha link * use File.exist? instead * bump mysql2 * control mysql2 gem * add custom rake test functions to provide option to suppress warnings * small edit to mysql.md * another one * add rake task for total tests * add a require for sass gem * update deprecated URI.encode * undo a comment on Rakefile I made * ensure consistency for rake task names * migrate rake tasks to new branch * update readme * update encoding method
- Loading branch information
1 parent
77ee135
commit a3bf9f6
Showing
17 changed files
with
176 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
# installation troubleshooting & instructions | ||
|
||
## System Agnostic | ||
|
||
- bundler skipping over **mysql2** gem? | ||
|
||
```Bash | ||
|
||
$ rm .bundle/config | ||
|
||
$ bundle exec bundle install | ||
|
||
``` | ||
|
||
|
||
|
||
## MacOS | ||
|
||
**Homebrew setup:** | ||
|
||
(Note: alternative to Homebrew is [mySQL community server](https://dev.mysql.com/downloads/mysql/5.7.html#downloads) - available for all systems) | ||
|
||
Dependencies: | ||
|
||
- `cmake` | ||
|
||
- `openssl` | ||
|
||
```Bash | ||
|
||
$ brew install cmake | ||
|
||
$ brew install openssl | ||
|
||
``` | ||
|
||
Installation: | ||
|
||
```Bash | ||
|
||
#make sure you don't have any other versions of mysql installed | ||
$ brew list | ||
|
||
#if you do | ||
$ brew uninstall <mysql@x.x> | ||
$ brew unlink <mysql@x.x> | ||
|
||
#install 5.7 | ||
$ brew install mysql@5.7 | ||
|
||
$ brew link mysql@5.7 --force | ||
``` | ||
|
||
Test Usage: | ||
|
||
```Bash | ||
|
||
# install brew services | ||
$ brew tap homebrew/services | ||
|
||
# cmd to run always - suggest aliasing this in your bash profile | ||
$ brew services start mysql@5.7 | ||
|
||
#confirm its running | ||
$ brew services list | ||
|
||
# cmd to stop running | ||
$ brew services stop mysql@5.7 | ||
|
||
``` | ||
|
||
Update Permissions | ||
|
||
```Bash | ||
# check for right permissions to the PIDs | ||
$ ls -laF /usr/local/var/mysql/ | ||
|
||
# if the owner is root you should change it to mysql or username | ||
$ sudo chown -R <username> /usr/local/var/mysql/ | ||
|
||
# confirm updated permissions | ||
$ ls -laF /usr/local/var/mysql/ | ||
|
||
``` | ||
|
||
Account Setup | ||
|
||
```Bash | ||
# secure your account | ||
$ mysql_secure_installation | ||
|
||
# set password | ||
$ mysqladmin -u root password <newpassword> | ||
# login -- not root anymore | ||
$ mysql -u <username> -p <password> | ||
|
||
``` | ||
|
||
Permission issues above? | ||
|
||
(note these commands also fix the error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)) | ||
|
||
```Bash | ||
|
||
$ mysql.server stop | ||
|
||
#unset the temporary directory | ||
$ echo $TMPDIR | ||
$ unset TMPDIR | ||
$ echo $TMPDIR | ||
|
||
$ whoami | ||
|
||
$ mysqld -initialize --verbose --user=$(whoami) --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | ||
|
||
#restart mysql | ||
$ mysql.server restart | ||
|
||
|
||
$ mysql -u root | ||
|
||
#You should now be in the mysql command line shell | ||
mysql> SELECT User, Host, authentication_string FROM mysql.user; | ||
|
||
mysql> rename user 'root'@'localhost' to '<yourUsername>'@'localhost'; | ||
|
||
#confirm | ||
mysql> SELECT User, Host, authentication_string FROM mysql.user; | ||
|
||
mysql> flush privileges; | ||
|
||
mysql> exit | ||
|
||
``` | ||
|
||
Reconfirm Access | ||
|
||
(whenever want to access the mysql db locally, need to run this login first - suggest aliasing in bash profile) | ||
|
||
```Bash | ||
|
||
$ mysql -u <username> -p | ||
|
||
``` | ||
|
||
|
||
|
||
## Pending: please add instructions for your respective system | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/usr/bin/env rake | ||
# Add your own tasks in files placed in lib/tasks ending in .rake, | ||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | ||
|
||
require File.expand_path('../config/application', __FILE__) | ||
|
||
Mapknitter::Application.load_tasks | ||
Mapknitter::Application.load_tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
db: | ||
image: mysql:5.6 | ||
image: mysql:5.7 | ||
environment: | ||
- MYSQL_DATABASE=mapknitter | ||
- MYSQL_USER=mapknitter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/usr/local/mysql/lib/libmysqlclient.18.dylib |