hns - 日記自動生成システム - Version 2.19.9

先月 2021年02月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2021年02月24日(水) 旧暦 [n年日記] [更新:"2004/08/09 23:43:33"]

#1 [pkgsrc] mysql-server-5.7.33

rc.d:

verona$ sudo cp  /usr/pkg/share/examples/rc.d/mysqld /etc/rc.d

verona$ sudo /etc/rc.d/mysqld onestart
Initializing MySQL database system tables.
2021-02-22T12:28:45.462202Z 0 [Warning] Changed limits: max_open_files: 3404 (requested 5000)
2021-02-22T12:28:45.463521Z 0 [Warning] Changed limits: table_open_cache: 1621 (requested 2000)
2021-02-22T12:28:45.465766Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. 
   Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-02-22T12:28:45.490278Z 0 [ERROR] Failed to create event (errno= 22).
2021-02-22T12:28:45.490315Z 0 [ERROR] Failed to start timer notify thread.
2021-02-22T12:28:45.490328Z 0 [ERROR] Failed to initialize timer component (errno 22).
2021-02-22T12:28:46.930297Z 0 [Warning] InnoDB: New log files created, LSN=45790
2021-02-22T12:28:47.166900Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2021-02-22T12:28:47.557911Z 0 [Warning] No existing UUID has been found, so we assume that 
   this is the first time that this server has been started. 
   Generating a new UUID: 82dc89b0-7509-11eb-a463-36709083ddcc.
2021-02-22T12:28:47.561035Z 0 [Warning] Gtid table is not ready to be used. 
  Table 'mysql.gtid_executed' cannot be opened.
2021-02-22T12:28:48.923248Z 0 [Warning] CA certificate ca.pem is self signed.
2021-02-22T12:28:49.295404Z 1 [Note] A temporary password is generated for root@localhost: vByqEo:BA0I_
Starting mysqld.

pkg_info -D:

verona$ pkg_info -D mysql-server
Information for mysql-server-5.7.33:

Install notice:
===========================================================================
$NetBSD: MESSAGE,v 1.1 2016/09/16 06:49:12 adam Exp $

After the tables are set up and the MySQL server is running,
please remember to set a password for the MySQL root user!
This is done by running both:

  /usr/pkg/bin/mysqladmin -u root -p password 'new-password'
  /usr/pkg/bin/mysqladmin -h `hostname` -u root -p password 'new-password'

The "Enter password:" prompt is asking for the existing password.
As there is no existing password, just press the Return key.

There is a script distributed with MySQL that can help you lock down
an installation.  This script has been installed to

  /usr/pkg/bin/mysql_secure_installation.

Please see the manual and the MySQL web site for more instructions.

===========================================================================
I don't figure out what 'both' means:
verona$  /usr/pkg/bin/mysqladmin -u root -p password 'new-password'
Enter password: 
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
verona$ 
above will set the password literaly to new-password.

and I understand 'both' means one of both is OK. One of each can be used.

check user:

mysql> SELECT user, host FROM mysql.user;
+---------------+-----------+
| user          | host      |
+---------------+-----------+
| mysql.session | localhost |
| mysql.sys     | localhost |
| root          | localhost |
+---------------+-----------+
3 rows in set (0.00 sec)

mysql> 

Add user:

mysql> create user 'www'@'localhost'  identified by 'real_password_here';
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT user, host FROM mysql.user;
+---------------+-----------+
| user          | host      |
+---------------+-----------+
| mysql.session | localhost |
| mysql.sys     | localhost |
| root          | localhost |
| www           | localhost |
+---------------+-----------+
4 rows in set (0.00 sec)

mysql> 

accessing datbase fails:

CF-SX2@makoto 08:30:01/210220(..git-work/ja-wordpress)% mysql wordpress -p -u www -h localhost
Enter password: 
ERROR 1044 (42000): Access denied for user 'www'@'localhost' to database 'wordpress'

check GRANTS:

mysql> SHOW GRANTS FOR 'www'@'localhost';
+-----------------------------------------+
| Grants for www@localhost                |
+-----------------------------------------+
| GRANT USAGE ON *.* TO 'www'@'localhost' |
+-----------------------------------------+
1 row in set (0.00 sec)

mysql> 
set ALL GRANTS
mysql> GRANT ALL on wordpress.* to www@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GRANTS FOR 'www'@'localhost';
+------------------------------------------------------------+
| Grants for www@localhost                                   |
+------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'www'@'localhost'                    |
| GRANT ALL PRIVILEGES ON `wordpress`.* TO 'www'@'localhost' |
+------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> 

#2 dump and restore



2021年02月20日() 旧暦 [n年日記] [更新:"2004/08/09 23:43:33"]

#1 [pkgsrc] make install-cf CF=netbsd-proto

verona$ cd /usr/pkg/share/sendmail/cf

verona$ sudo make install-cf CF=netbsd-proto
rm -f netbsd-proto.cf
m4 ../m4/cf.m4 netbsd-proto.mc > netbsd-proto.cf || ( rm -f netbsd-proto.cf && exit 1 )
echo "### netbsd-proto.mc ###" >>netbsd-proto.cf
sed -e 's/^/# /' netbsd-proto.mc >>netbsd-proto.cf
chmod 444 netbsd-proto.cf
/usr/bin/install -c -o pbulk -g wheel -m 0444 netbsd-proto.cf /etc/mail/sendmail.cf
install: unknown user pbulk
*** Error code 1

Stop.
make: stopped in /usr/pkg/share/sendmail/cf
verona$ sudo make install-cf CF=netbsd-proto
verona$ sudo /usr/bin/install -c -o root  -g wheel -m 0444 netbsd-proto.cf /etc/mail/sendmail.cf



最近の日記
2021年02月24日
mysql-server-5.7.33
dump and restore
2021年02月20日
make install-cf CF=netbsd-proto
2021年01月31日
w3m-0.5.3-git20210102
minimum test case:
2021年01月30日
w3m-0.5.3-git20210102
file.c
2021年01月09日

以上、2 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)