Re: myqsl dummy needs help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2009-02-16 at 14:06 -0500, Gene Heskett wrote:
> On Monday 16 February 2009, Craig White wrote:

> >----
> >I think original setup for mysql is for root user via local socket and
> >not via localhost so there actually isn't an account for root@localhost
> >thus attempting to connect via tcp/ip as root is doomed to fail out of
> >the box.
> >
> >Craig
> 
> With all due respect Craig, what the hell use is it then when ALL the 
> documentation is wrong?
> 
> Now, I just had the bright idea of looking at the mysqld.log after ripping 
> it all out and putting even more of it back in, and see this:
> 
> [root@coyote etc]# cat /var/log/mysqld.log
> 090216 13:30:36  mysqld ended
> 
> 090216 13:30:45  mysqld started
> /usr/libexec/mysqld: Can't create/write to file '/tmp/ibnoIZas' (Errcode: 13)
> 090216 13:30:45  InnoDB: Error: unable to create temporary file; errno: 13
> 090216 13:30:45 [Note] /usr/libexec/mysqld: ready for connections.
> Version: '5.0.45'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
> 
> So obviously /tmp doesn't have the right perms.  Or at least I assume (there 
> is that word again) that an error 13 is permissions related.  Selinux is in 
> targeted mode, enabled, and it isn't fussing.
> 
> /tmp itself is drwxr-xr-x  amanda disk   system_u:object_r:tmp_t:s0       tmp
> but nearly everything in it is root:root except the amanda and amanda-debug 
> directories.  So I just changed tmp to drwxrwxrwx  But that also didn't change
> anything. Or did it, now the log shows this when I restart mysqld:
> 
> 090216 13:51:44  mysqld started
> InnoDB: The first specified data file ./ibdata1 did not exist:
> InnoDB: a new database to be created!
> 090216 13:51:44  InnoDB: Setting file ./ibdata1 size to 10 MB
> InnoDB: Database physically writes the file full: wait...
> 090216 13:51:45  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
> InnoDB: Setting log file ./ib_logfile0 size to 5 MB
> InnoDB: Database physically writes the file full: wait...
> 090216 13:51:45  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
> InnoDB: Setting log file ./ib_logfile1 size to 5 MB
> InnoDB: Database physically writes the file full: wait...
> InnoDB: Doublewrite buffer not found: creating new
> InnoDB: Doublewrite buffer created
> InnoDB: Creating foreign key constraint system tables
> InnoDB: Foreign key constraint system tables created
> 090216 13:51:46  InnoDB: Started; log sequence number 0 0
> 090216 13:51:46 [Note] /usr/libexec/mysqld: ready for connections.
> Version: '5.0.45'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
> 
> Which says one problem seems to be sorted, at the expense of a huge security 
> hole in /tmp as anyone can do anything there now.
> 
> Ok, so now try a login again:
> [root@coyote /]# mysql -u root -p
> Enter password:
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
> [root@coyote /]# mysql -u root -p
> Enter password:
> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
> [root@coyote /]#
> 
> Seems like this is where I started, isn't it?
> 
> Now that the tmp perms is sorted, I suppose I need to go back and do all that 
> other stuff again...
> 
> Which I just did, and didn't change a thing.  WTF?
> Thanks Craig
----
after initial installation but before you actually ever start mysqld
service...

mysqladmin - u root password 'new-password'

*might* work after the mysqld service has already been started but if
you look at the script involved in /etc/init.d/mysqld, much will happen
the first time you start it.

You can always stop mysqld service, empty contents of /var/lib/mysql and
start the service if you don't care about any of the setup.

As for the documentation...it's not wrong but the documentation doesn't
account for what the various distributions will do with their
initialization scripts.

If it's all too much for you, install webmin and use that to
create/maintain user accounts in mysql.

Craig

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux