This error indicates that your MySQL server is not running. See, you are stopping the MySQL server using regular Ubuntu tools.
sudo service mysql stop
Following this, you try to start the server bypassing the service command, without specifying either the socket path or the data directory path.
sudo mysqld --skip-grant-tables --user=root
This is not a good idea, you will probably forget something or not. If you need to start a MySQL server without a privilege table, it is better to temporarily edit the my.cnf configuration file (in ubuntu it is located on the /etc/mysql/my.cnf path) and add the skip-grant-tables directive
[mysqld] ... skip-grant-tables
After that, start the server using regular Ubuntu tools.
sudo service mysql start
PS In addition, you will find the debian.cnf file in the / etc / mysql / folder, which contains the debian-sys-maint system user password - it also has superuser rights, in which case you can go out of it and configure the password and the rights of others users, including root.