Näytä kirjoitukset

Tässä osiossa voit tarkastella kaikkia tämän jäsenen viestejä. Huomaa, että näet viestit vain niiltä alueilta, joihin sinulla on pääsy.


Viestit - teele

Sivuja: [1] 2 3 ... 29
1

Jos esimerkiksi kokeilee chattia php:llä niin, että keskustelijoiden kommentit kerätään joltain ajanjaksolta näytettäväksi ja selattavaksi kaikille osallistujille, niin voisiko arvioida, olisiko kannattavaa käyttää mysql:ää tai tavallista tekstitiedostoa tietojen tallentamiseen.

Tietokanta olisi varmaan monipuolisempi, mutta pilvitila on pieni eikä tietokantaa edes ole pakko pitää päällä ollenkaan. Jossain netissä on ollut kirjoituksia, että php:n tietokantakyselyitä pitäisi välttää, koska tekstitiedotoista lukeminen on paljon kevyempää.

 


2
Nåyttää, että rootin salasana on vapaaehtoinen, käynnistyy ilmeisestikin salasanan kera ja ilman riippuen, haluttanko mysql- käynnistystä salasanan kanssa vai ilman salasanaa.

Koodia: [Valitse]

sudo mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.30-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> UPDATE mysql.user SET authentication_string=password('porokkama') WHERE user='root';
Query OK, 0 rows affected, 1 warning (0.01 sec)
Rows matched: 1  Changed: 0  Warnings: 1

mysql> quit;

$ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.30-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit
Bye


Ensimmäinen tavallinen komento on saatu läpi!

Koodia: [Valitse]
sudo mysql -u root
[sudo] password for pilvikone:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.30-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SELECT VERSION(), CURRENT_DATE;
+-------------------------+--------------+
| VERSION()               | CURRENT_DATE |
+-------------------------+--------------+
| 5.7.30-0ubuntu0.18.04.1 | 2020-07-01   |
+-------------------------+--------------+
1 row in set (0.01 sec)

mysql>


Jos mitään yllättävää ei tule vastaan, laitan säikeen ratkaistuksi vähän ajan kuluttua.

Kiitos kaikista hyvistä vastuksista  :)




3
Mysql jatkuu. On kuitenkin vielä epäselvää, onnistuiko rootin salasanan asettaminen vai ei. Ilmoitusten mukaan yhden rivin arvo on muuttunut, mutta varoitus viittaisi siihen, että jotakin on kuitenkin mennyt väärin.

Toinen alla olevasta päätetkestistä näkyvä asia on, että mysql-kehotteesta ei näytä pääsevän mitenkään pois. 

Koodia: [Valitse]
$ sudo systemctl stop mysql.service
$ sudo mysqld_safe --skip-grant-tables --skip-networking &
[1] 3847
$ 2020-07-01T09:41:47.674873Z mysqld_safe Logging to syslog.
2020-07-01T09:41:47.678905Z mysqld_safe Logging to '/var/log/mysql/error.log'.
2020-07-01T09:41:47.701035Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.30-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> UPDATE mysql.user SET authentication_string=password('rootinsalasana') WHERE user='root';
Query OK, 1 row affected, 1 warning (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 1

mysql> mysqladmin -u root -p shutdown
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqladmin -u root -p shutdown' at line 1

mysql>  mysqld stop;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqld stop' at line 1
mysql> shutdown;
Query OK, 0 rows affected (0.00 sec)

mysql> 2020-07-01T09:49:59.020312Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended



Kill- tai pkil-komentojen käyttäminen toisessa päätteessä ei ehkä ole ihan oikea ratkaisu?

Voisiko varoitus koskea sitä, että salasanaa on aiottu muuttaa  --skip-grant-tables valinnan kanssa ja mitään tietoja ei olekaan muutettu. MIkä oikeastaan on sammumasta kieltäytyvä mysql-ohjelma, ei ehkä itse palvelin?

Muok.

Vielä tuli yksi lisäkysymys  vastaan. pgrep ja ps näyttävät eri määrän käynnissäolevia mysql-prosesseja?

Koodia: [Valitse]
$ pgrep mysql
4253
$ ps aux | grep mysql
pilvikäyttäjä     4253  0.0  0.3  40600  7880 pts/0    S+   11:42   0:00 mysql -u root
pilvikäyttäjä     5815  0.0  0.0  14856  1084 pts/1    S+   13:06   0:00 grep --color=auto mysql





4
Mysql-common on nyt poistettu poistettu ja tilanne näyttää paremmalta, asennus osannee itse korjata havaitsemansa virhee: AppAmor-rivi alla, ja sitten erityisesti kaksi viimeistä riviä, uskaltaisi jo oletella, että asennus on edistynyt, mutta vielä en ole enempää ehtinyt kokeilla....

Koodia: [Valitse]
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysql'
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Setting up mysql-server (5.7.30-0ubuntu0.18.04.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.41) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
~$ sudo service mysql start
~$ sudo service mysql stop

Tällä kertaa käytetty komentoja

Koodia: [Valitse]
sudo apt-get --yes purge mysql-common
sudo apt-get --yes autoremove --purge
sudo apt-get install mysql-server

Aikaisemmin käytetty apt-komentoa oletuksella, että apt ja apt-get tekevät samat asiat.

Muok.

Koodia: [Valitse]
sudo mysqladmin -u root -p status
Enter password:
Uptime: 857  Threads: 1  Questions: 2  Slow queries: 0  Opens: 105  Flush tables: 1  Open tables: 98  Queries per second avg: 0.002

sudo /etc/init.d/mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-06-28 07:49:09 CEST; 16min ago
  Process: 18283 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=0/SUCCESS)
  Process: 18261 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 18285 (mysqld)
    Tasks: 28 (limit: 2298)
   CGroup: /system.slice/mysql.service
           └─18285 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid




Ainakin jotain näyttäisi olevan toiminnassa 

Jos mitään yllättävää ei ilmaannu, voinen vähän ajan kuluttua laittaa säikeen ratkaistuiksi. Se tarkoittaisi sitä, että tilanne on pysynyt entisellään: Koskaan ei Ubuntun kanssa ole ollut sellaisia ongelmia, joita ei tämän sivuston neuvoilla ole pystytty ratkaisemaan.  :)

5
Poistojen jälkeen tuloksena oli ilmeisestkin vähän erilainen virheraportti

Koodia: [Valitse]
sudo apt install mysql-server
[sudo] password for pilvikone:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libevent-core-2.1-6 mysql-client-5.7 mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
  mailx tinyca
Recommended packages:
  libhtml-template-perl
The following NEW packages will be installed:
  libevent-core-2.1-6 mysql-client-5.7 mysql-server mysql-server-5.7
  mysql-server-core-5.7
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/12.4 MB of archives.
After this operation, 124 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package mysql-client-5.7.
(Reading database ... 40328 files and directories currently installed.)
Preparing to unpack .../mysql-client-5.7_5.7.30-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../mysql-server-core-5.7_5.7.30-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Selecting previously unselected package libevent-core-2.1-6:amd64.
Preparing to unpack .../libevent-core-2.1-6_2.1.8-stable-4build1_amd64.deb ...
Unpacking libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ...
Selecting previously unselected package mysql-server-5.7.
Preparing to unpack .../mysql-server-5.7_5.7.30-0ubuntu0.18.04.1_amd64.deb ...
grep: /etc/mysql/: No such file or directory
Unpacking mysql-server-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.30-0ubuntu0.18.04.1_all.deb ...
Unpacking mysql-server (5.7.30-0ubuntu0.18.04.1) ...
Setting up libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ...
Setting up mysql-server-core-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Setting up mysql-client-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.30-0ubuntu0.18.04.1) ...
update-alternatives: warning: alternative /etc/mysql/my.cnf.fallback (part of link group my.cnf) doesn't exist; removing from list of alternatives
update-alternatives: warning: /etc/alternatives/my.cnf is dangling; it will be updated with best choice
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Once the problem is resolved, run apt-get --fix-broken install to retry.
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.27-3ubuntu1) ...No apport report written because the error message indicates its a followup error from a previous failure.

Processing triggers for systemd (237-3ubuntu10.41) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Asennus- tai virheraportissa on nettiosoite

https://wiki.debian.org/Teams/MySQL/FAQ

josta pitäisi saada lisätietoa, mutta en ole vielä saanut asiaa sen enempää selvitettyä.

Muok.
 Ehkä asennuspaketeista puuttuu todella jotain

Koodia: [Valitse]
warning: alternative /etc/mysql/my.cnf.fallback (part of link group my.cnf) doesn't exist; removing from list of alternatives
update-alternatives: warning: /etc/alternatives/my.cnf is dangling; it will be updated with best choic

Sitten kun ongelma on ratkennut, voi ehkä päästä jatkamaan suoraan

Koodia: [Valitse]
Once the problem is resolved, run apt-get --fix-broken install to retry.


6

Komentojen tulokset ovat

Koodia: [Valitse]
$ dpkg -l | grep libpam-tmpdir
$


ja

Koodia: [Valitse]
$ mktemp
/tmp/tmp.utxsskGiQw
$

Pilvikoneelle oli saatvissa päivityksiä ja otin ne apt uprgradella. Tässäkin taas oli aika harvinainen virhe, joka näyttää liittyvän juuri mysql:ään. Tulostus on vähän pitkä, mutta laitan sen tähän samalla, jos siitä irtoaisi jotain asiaan liittyvää. Mysql-ilmoitukset ovat ihan etenemisraportin lopussa.

Koodia: [Valitse]
sudo apt upgrade
[sudo] password for pilvikone:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-image-4.15.0-108-generic linux-modules-4.15.0-108-generic
The following packages will be upgraded:
  curl libcurl3-gnutls libcurl4 linux-image-virtual linux-libc-dev
5 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 22.6 MB of archives.
After this operation, 73.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 curl amd64 7.58.0-2ubuntu3.9 [159 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.9 [214 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl3-gnutls amd64 7.58.0-2ubuntu3.9 [212 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-modules-4.15.0-108-generic amd64 4.15.0-108.109 [13.0 MB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-image-4.15.0-108-generic amd64 4.15.0-108.109 [8008 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-image-virtual amd64 4.15.0.108.96 [2412 B]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-108.109 [991 kB]
Fetched 22.6 MB in 1s (22.9 MB/s)   
(Reading database ... 40560 files and directories currently installed.)
Preparing to unpack .../0-curl_7.58.0-2ubuntu3.9_amd64.deb ...
Unpacking curl (7.58.0-2ubuntu3.9) over (7.58.0-2ubuntu3.8) ...
Preparing to unpack .../1-libcurl4_7.58.0-2ubuntu3.9_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.9) over (7.58.0-2ubuntu3.8) ...
Preparing to unpack .../2-libcurl3-gnutls_7.58.0-2ubuntu3.9_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.9) over (7.58.0-2ubuntu3.8) ...
Selecting previously unselected package linux-modules-4.15.0-108-generic.
Preparing to unpack .../3-linux-modules-4.15.0-108-generic_4.15.0-108.109_amd64.deb ...
Unpacking linux-modules-4.15.0-108-generic (4.15.0-108.109) ...
Selecting previously unselected package linux-image-4.15.0-108-generic.
Preparing to unpack .../4-linux-image-4.15.0-108-generic_4.15.0-108.109_amd64.deb ...
Unpacking linux-image-4.15.0-108-generic (4.15.0-108.109) ...
Preparing to unpack .../5-linux-image-virtual_4.15.0.108.96_amd64.deb ...
Unpacking linux-image-virtual (4.15.0.108.96) over (4.15.0.106.94) ...
Preparing to unpack .../6-linux-libc-dev_4.15.0-108.109_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.15.0-108.109) over (4.15.0-106.107) ...
Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.9) ...
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.9) ...
Setting up linux-libc-dev:amd64 (4.15.0-108.109) ...
Setting up linux-modules-4.15.0-108-generic (4.15.0-108.109) ...
Setting up linux-image-4.15.0-108-generic (4.15.0-108.109) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.15.0-106-generic
I: /initrd.img.old is now a symlink to boot/initrd.img-4.15.0-106-generic
I: /vmlinuz is now a symlink to boot/vmlinuz-4.15.0-108-generic
I: /initrd.img is now a symlink to boot/initrd.img-4.15.0-108-generic
Setting up mysql-server-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
Error occurred: Cannot select database.
mysql_upgrade failed with exit status 1
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Setting up curl (7.58.0-2ubuntu3.9) ...
Setting up linux-image-virtual (4.15.0.108.96) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...No apport report written because the error message indicates its a followup error from a previous failure.

Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for linux-image-4.15.0-108-generic (4.15.0-108.109) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.15.0-108-generic
/etc/kernel/postinst.d/x-grub-legacy-ec2:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-4.15.0-106-generic
Found kernel: /boot/vmlinuz-4.15.0-101-generic
Found kernel: /boot/vmlinuz-4.15.0-108-generic
Found kernel: /boot/vmlinuz-4.15.0-106-generic
Found kernel: /boot/vmlinuz-4.15.0-101-generic
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-108-generic
Found initrd image: /boot/initrd.img-4.15.0-108-generic
Found linux image: /boot/vmlinuz-4.15.0-106-generic
Found initrd image: /boot/initrd.img-4.15.0-106-generic
Found linux image: /boot/vmlinuz-4.15.0-101-generic
Found initrd image: /boot/initrd.img-4.15.0-101-generic
done
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)



7
Yleistä keskustelua / Ratkeamaton mysql-asennusongelma?
« : 27.06.20 - klo:09.38 »

Olen yrittänyt asentaa mysql:ää pieneen pilvikoneeseen, mutta tähän mennessä se ei ole onnistunut. Asiasta on keskusteltu Ohjelmonti ja muu edistyneempi käyttö -välilehdellä ja sieltä on saanut hyviä neuvoja. Mutta jostain syystä asennus ei oloe vieläkään onnisutnut. Keskustelu aiheesta on mennyt jo toiselle eli jatkosivulle.

Kannattaisiko vielä yrittää ja tehdä uusi keskustelusäie mahdollisimman kuvaavalla otsikolla vai pitäisikö asia jättää ratkeamattomaksi. Ongelman lopullista vaikeusastetta on vaikea arvioida, koska  nyt on menossa vasta ensimmäinen tutustumisyritys mysql:ään.

Sillä tavalla tilanne on uusi, että koskaan aikaisemmin Ubuntun kanssa ei ole tullut eteen tilannetta, joka ei tämän keskustelusivuston avulla olisi selvinnyt  :)
 

8
Alkuperäisvirheet ilmestyvät uudellakin asennusyrityksellä, vaikka mysql-common on asennettu ensin ja pehmolinkit näyttivät olevan paikoillaan. Alla on kaikki asennusyrityksen tulostukset, vaikka se kasvaattaakin rivimäärää. Pilvikoneen ohjelmalähteet eroavat oman koneen ohjelmalähteistä niin, että pilvikoneessa ei haeta suomalaisesta ohjelmalähdevarastosta vaaan suoraan ubuntulta. Voisiko tästä tulla virhettä?

Koodia: [Valitse]
sudo apt install mysql-server mysql-client
[sudo] password for slam1:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  mysql-client-5.7 mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
  mailx tinyca
Recommended packages:
  libhtml-template-perl
The following NEW packages will be installed:
  mysql-client mysql-client-5.7 mysql-server mysql-server-5.7
  mysql-server-core-5.7
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/12.3 MB of archives.
After this operation, 124 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package mysql-client-5.7.
(Reading database ... 40347 files and directories currently installed.)
Preparing to unpack .../mysql-client-5.7_5.7.30-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../mysql-server-core-5.7_5.7.30-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server-5.7.
Preparing to unpack .../mysql-server-5.7_5.7.30-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../mysql-client_5.7.30-0ubuntu0.18.04.1_all.deb ...
Unpacking mysql-client (5.7.30-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.30-0ubuntu0.18.04.1_all.deb ...
Unpacking mysql-server (5.7.30-0ubuntu0.18.04.1) ...
Setting up mysql-server-core-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Setting up mysql-client-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Setting up mysql-client (5.7.30-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.30-0ubuntu0.18.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Specified filename /var/lib/mysql/ibdata1 does not exist.
Error occurred: Cannot select database.
mysql_upgrade failed with exit status 1
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (237-3ubuntu10.41) ...No apport report written because the error message indicates its a followup error from a previous failure.

Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


Muok.
Virheen "Specified filename /var/lib/mysql/ibdata1 does not exist." haulla tulee osumia netistä, mutta ratkaisua ei ole vielä löytynyt.

9
Näyttää siltä, että mysql-common ei olekaan poistunut eli eiliset poistoyritykset eivät kokonaan onnistuneet.

Koodia: [Valitse]
sudo apt install mysql-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql-common is already the newest version (5.8+1.0.4).
The following package was automatically installed and is no longer required:
  libevent-core-2.1-6
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Poistin sen
Koodia: [Valitse]
sudo apt-get purge mysql-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libevent-core-2.1-6
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  mysql-client* mysql-client-5.7* mysql-common*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 31.3 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 40385 files and directories currently installed.)
Removing mysql-client (5.7.30-0ubuntu0.18.04.1) ...
Removing mysql-client-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Removing mysql-common (5.8+1.0.4) ...
update-alternatives: warning: alternative /etc/mysql/my.cnf.fallback (part of link group my.cnf) doesn't exist; removing from list of alternatives
update-alternatives: warning: /etc/alternatives/my.cnf is dangling; it will be updated with best choice
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
(Reading database ... 40337 files and directories currently installed.)
Purging configuration files for mysql-common (5.8+1.0.4) ...

ja asensin uudestaan
Koodia: [Valitse]
sudo apt install mysql-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libevent-core-2.1-6
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  mysql-common
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/7308 B of archives.
After this operation, 34.8 kB of additional disk space will be used.
Selecting previously unselected package mysql-common.
(Reading database ... 40334 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.8+1.0.4_all.deb ...
Unpacking mysql-common (5.8+1.0.4) ...
Setting up mysql-common (5.8+1.0.4) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode

nyt pehmolinkit ovat paikoilaan
Koodia: [Valitse]
ls -l /usr/share/mysql-common/configure-symlinks
-rwxr-xr-x 1 root root 276 Aug  3  2016 /usr/share/mysql-common/configure-symlinks

Seuraavaksi pitänee asentaa mysql-server ja mysql-client, mutta laitan tämän väliaikaisvarmistuskyselynä ennen kuin ehdin tehdä mitään asennuksia, joiden poistamisessa joudun ongelmiin.






10
Taisi lähteä
Koodia: [Valitse]
sudo  dpkg --remove --force-remove-reinstreq mysql-server-core-5.7 mysql-server-5.7 mysql-server
[sudo] password for slam1:
(Reading database ... 40556 files and directories currently installed.)
Removing mysql-server-5.7 (5.7.30-0ubuntu0.18.04.1) ...
dpkg: warning: ignoring request to remove mysql-server which isn't installed
Removing mysql-server-core-5.7 (5.7.30-0ubuntu0.18.04.1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

jos varoitus ei haittaa,

Pehmolinkit ainakin näyttävät häipyneen
Koodia: [Valitse]
ls /usr/share/mysql-common/configure-symlinksls: cannot access '/usr/share/mysql-common/configure-symlinks': No such file or directory
Muok.
Eli nyt mysql-common ja sitten mysql-server ja mysql-client, tai mikä sen asiakkaan merkitys tässä on, ehkä sen voi laittaa sitten, jos palvelinasennus menee läpi.

11
Pakettien poistossa taitaa olla jotain häikkää,

Koodia: [Valitse]
sudo apt purge mysql-server
[sudo] password for pilvikone:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libevent-core-2.1-6 mysql-server-5.7 mysql-server-core-5.7
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  mysql-server*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 111 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 40560 files and directories currently installed.)
Removing mysql-server (5.7.30-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.30-0ubuntu0.18.04.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 191: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)

Onko muuta keinoa poistaa kaikki mysql -paketit.

12

katsoin vielä tämänkin

Koodia: [Valitse]
ls -l /usr/share/mysql-common/configure-symlinks
ls: cannot access '/usr/share/mysql-common/configure-symlinks': No such file or directory

13

tässä komento ja ilmoitukset, ei onnistunut, näyttää, että mysql-common olisi jo, olenko töpeksinyt sittekin poistoissa

Koodia: [Valitse]
sudo apt install mysql-common
[sudo] password for pilvikone:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql-common is already the newest version (5.8+1.0.4).
mysql-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.7 (5.7.30-0ubuntu0.18.04.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 191: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
         Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

14
ei ole mitään

Koodia: [Valitse]
dpkg -l | grep mariadb


16
 näin väliaikatietona: yritin asentaa mariaDB:tä mutta se ei onnistunut, selvitän asiaa ...

Koodia: [Valitse]
apt-cache policy mysql-common
mysql-common:
  Installed: 5.8+1.0.4
  Candidate: 5.8+1.0.4
  Version table:
 *** 5.8+1.0.4 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages
        500 http://mirror.hetzner.de/ubuntu/packages bionic/main amd64 Packages
        500 http://mirror.hetzner.de/ubuntu/packages bionic/main i386 Packages
        100 /var/lib/dpkg/status

17

uusi yritys poistojen jälkeen

Koodia: [Valitse]
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 191: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.27-3ubuntu1) ...No apport report written because the error message indicates its a followup error from a previous failure.

Processing triggers for systemd (237-3ubuntu10.41) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

eli jotain näyttäisi puuttuvan

Koodia: [Valitse]
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 191: /usr/share/mysql-common/configure-symlinks: No such file or directory
tulostuksesta otettu ensimmäinen epäilyttävä rivi, siihen asti kaikki vaikuttaa menenvän niin, kuin pitääkin.

18
 hakemistoa ei ole
Koodia: [Valitse]
ls -ld /var/lib/mysql
ls: cannot access '/var/lib/mysql': No such file or directory

Mutta mikä on näiden merkitys
Koodia: [Valitse]
dpkg -l | grep mysql
ii  mysql-client                     5.7.30-0ubuntu0.18.04.1             all          MySQL database client (metapackage depending on the latest version)
ii  mysql-client-5.7                 5.7.30-0ubuntu0.18.04.1             amd64        MySQL database client binaries
ii  mysql-client-core-5.7            5.7.30-0ubuntu0.18.04.1             amd64        MySQL database core client binaries
ii  mysql-common                     5.8+1.0.4                           all          MySQL database common files, e.g. /etc/mysql/my.cnf

Mjuok.

Poistin asiakkaankin

Koodia: [Valitse]
sudo apt purge mysql-client
jos sillä olisi jotain vaikutusta asiaan

19
Mysql -asennus epäonnistuu, tässä tulostuksia, joista voisi selvitä jotain sille, joka asioita ymmärtää

Koodia: [Valitse]
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2020-06-17 13:17:33 CEST; 21ms ago
  Process: 18383 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
  Process: 18362 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

Jun 17 13:17:33 ubuntu-2gb-hel1-1 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jun 17 13:17:33 ubuntu-2gb-hel1-1 systemd[1]: Failed to start MySQL Community Server.
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.41) ...
No apport report written because the error message indicates its a followup error from a previous failure.
        Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Asennuspyyntö oli
Koodia: [Valitse]
sudo apt install mysql-server mysql-client

20

Edistyy, mutta

Koodia: [Valitse]
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password  BY 'Salasana';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

eli tiedostojen luonti auttoi, mutta tauluoptioiden pois jättminen estää salasanan laittamista?

Sivuja: [1] 2 3 ... 29