Skip to content

Commit

Permalink
添加本地mysqld自启动服务
Browse files Browse the repository at this point in the history
添加数据库自启动服务。修复服务器重启后./server.sh start 会提示错误——“Starting jumpsever
service:run_websocket.py not running”
  • Loading branch information
wangjunj committed Jan 28, 2016
1 parent b790562 commit 02e9ba5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def _setup_mysql(self):
color_print('默认用户名: %s 默认密码: %s' % (self.db_user, self.db_pass), 'green')
bash('yum -y install mysql-server')
bash('service mysqld start')
bash('chkconfig mysqld on')
bash('mysql -e "create database %s default charset=utf8"' % self.db)
bash('mysql -e "grant all on %s.* to \'%s\'@\'%s\' identified by \'%s\'"' % (self.db,
self.db_user,
Expand Down

0 comments on commit 02e9ba5

Please sign in to comment.