NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure.
Thanks for using MariaDB!
我解释下上面每步都是做什么的 Enter current password for root (enter for none): 当你第一次运行时直接回车就好,就是问你原来的root密码是什么,因为第一次运行,所以直接回车就好 Set root password? [Y/n] y 问你是不是设置root密码 Remove anonymous users? [Y/n] y 问你是不是移除匿名用户 Disallow root login remotely? [Y/n] y 禁止root远程登录 Remove test database and access to it? [Y/n] y 移除test数据库 Reload privilege tables now? [Y/n] y 重新加载权限表 最后运行mysql -uroot -p登入mariadb验证下
导入open-falcon数据表 安装git yum install git 下载falcon-plus里面有open-falcon的数据库导入就好 git clone https://github.com/open-falcon/falcon-plus.git 进入下面这个目录,然后执行下面命令 cd /root/falcon-plus/scripts/mysql/db_schema mysql -h 127.0.0.1 -u root -p < 1_uic-db-schema.sql mysql -h 127.0.0.1 -u root -p < 2_portal-db-schema.sql mysql -h 127.0.0.1 -u root -p < 3_dashboard-db-schema.sql mysql -h 127.0.0.1 -u root -p < 4_graph-db-schema.sql mysql -h 127.0.0.1 -u root -p < 5_alarms-db-schema.sql
[[email protected] open-falcon]# ./open-falcon check falcon-graph UP 27849 falcon-hbs UP 27858 falcon-judge UP 27868 falcon-transfer UP 27876 falcon-nodata UP 27883 falcon-aggregator UP 27891 falcon-agent UP 27901 falcon-gateway UP 27908 falcon-api UP 27915 falcon-alarm UP 27929