These are chat archives for collectiveaccess/support

15th
Feb 2016
punkhop
@punkhop
Feb 15 2016 18:16
Hey CA - anyone around for me to ask a few questions?
kaik84
@kaik84
Feb 15 2016 18:16
hello
punkhop
@punkhop
Feb 15 2016 18:17
Hi Kaik - are you support from CA?
kaik84
@kaik84
Feb 15 2016 18:18
yes
how can I help you?
punkhop
@punkhop
Feb 15 2016 18:18
I'm working on a client's CA installation
on a Mac
kaik84
@kaik84
Feb 15 2016 18:18
Alright
punkhop
@punkhop
Feb 15 2016 18:19
They tried to install Imagemagick and screwed up some permissions and ownership, and now they can't get their MySql database to start.
I know very little about database administration and hoping there was someone who could remote into this Mac and fix our permissions/ownership problem. The whole CA installation was working, and the user broke something.
kaik84
@kaik84
Feb 15 2016 18:19
Is this MAMP, or the bundled version of MySQL that comes with Mac OS X?
punkhop
@punkhop
Feb 15 2016 18:19
How would I check that?
kaik84
@kaik84
Feb 15 2016 18:20
There should be a MAMP folder in the Applications directory
punkhop
@punkhop
Feb 15 2016 18:20
No MAMP.
kaik84
@kaik84
Feb 15 2016 18:20
If there isn’t, you can run mysql -v to check that it’s installed
ok then
punkhop
@punkhop
Feb 15 2016 18:21
tried running mysql -v and command not found.
CollectiveAccess
@collectiveaccess
Feb 15 2016 18:21
hi
I'm afraid we can't do remoting unless we have a support relationship with the machine's owner
but we can try to help you figure it out
punkhop
@punkhop
Feb 15 2016 18:22
I'd really appreciate that.
CollectiveAccess
@collectiveaccess
Feb 15 2016 18:22
Open up the terminal
and type "which mysql"
punkhop
@punkhop
Feb 15 2016 18:22
Before we start
CollectiveAccess
@collectiveaccess
Feb 15 2016 18:22
and let us know what comes back
punkhop
@punkhop
Feb 15 2016 18:22
How would you start a support relationship with this office?
I'm their for-hire IT guy and not a database admin, I come in every few months and help them with their computers.
Whenever they've asked me a question about CA, I'm mostly useless.
It'd be great for them to have a go-to support system for any CA issues they have.
CollectiveAccess
@collectiveaccess
Feb 15 2016 18:23
They'd have to pay us for a block of support hours
but we can help you figure it out without charge
punkhop
@punkhop
Feb 15 2016 18:23
Great, ok
So, I did which mysql
CollectiveAccess
@collectiveaccess
Feb 15 2016 18:23
we just can't be going into people's machines without some sort of agreement
punkhop
@punkhop
Feb 15 2016 18:24
Of course
which mysql didn't run a command
just gave me a new prompt in terminal, blank
I tried sudo which mysql, same thing.
CollectiveAccess
@collectiveaccess
Feb 15 2016 18:24
that means mysql is not installed
kaik84
@kaik84
Feb 15 2016 18:24
yep
CollectiveAccess
@collectiveaccess
Feb 15 2016 18:24
or it's not in your path
punkhop
@punkhop
Feb 15 2016 18:24
The current issue - the mysql server won't start
kaik84
@kaik84
Feb 15 2016 18:25
Hmm
punkhop
@punkhop
Feb 15 2016 18:25
Said that /usr/local/mysql/data isn't owned by the mysql or _mysql user.
kaik84
@kaik84
Feb 15 2016 18:25
aha
punkhop
@punkhop
Feb 15 2016 18:25
The owner here tried installing imagemagick and screwed with the permissions.
kaik84
@kaik84
Feb 15 2016 18:25
do chown -R mysql /usr/local/mysql/data
punkhop
@punkhop
Feb 15 2016 18:26
Operation not permitted.
kaik84
@kaik84
Feb 15 2016 18:26
Alright, do you have sudo access?
punkhop
@punkhop
Feb 15 2016 18:26
The user is an admin
kaik84
@kaik84
Feb 15 2016 18:26
Alright
punkhop
@punkhop
Feb 15 2016 18:26
I could try sudo that command
kaik84
@kaik84
Feb 15 2016 18:26
Run it with sudo then
so sudo chown -R mysql /usr/local/mysql/data
punkhop
@punkhop
Feb 15 2016 18:27
I think that got the server running
kaik84
@kaik84
Feb 15 2016 18:27
Alright
Do service mysql status
or service mysqld status if that doesn’t work
punkhop
@punkhop
Feb 15 2016 18:27
both commands not found
kaik84
@kaik84
Feb 15 2016 18:27
oops never mind
service isn’t on Macs
sudo /usr/local/mysql/support-files/mysql.server restart
AGH
Sorry
punkhop
@punkhop
Feb 15 2016 18:28
haha
no worries
I'm just glad you're helping me at all
Should I run that last command?
kaik84
@kaik84
Feb 15 2016 18:30
That one didn’t work
Try /usr/local/bin/mysql.server start or mysqld
If it messes something up, just restart
sometimes you get weird errors about locking files
punkhop
@punkhop
Feb 15 2016 18:30
pl
ok
no such file or directory, then command not found.
kaik84
@kaik84
Feb 15 2016 18:31
Alright… let’s try something else
Do you have Homebrew installed?
punkhop
@punkhop
Feb 15 2016 18:31
Gonna restart anyway, just uninstalled Chrome - it was crashing on launch and that's how we get to our CA
kaik84
@kaik84
Feb 15 2016 18:32
If not, get it on the machine
It’ll allow you to quickly install MySQL
then the mysqld command should work
also, my apologies in advance if the machine somehow gets messed up
punkhop
@punkhop
Feb 15 2016 18:32
I've got a mysql control panel
and it said it was running
kaik84
@kaik84
Feb 15 2016 18:32
But hopefully it doesn’t
Alright
punkhop
@punkhop
Feb 15 2016 18:32
restarting now
kaik84
@kaik84
Feb 15 2016 18:32
Try to connect via the terminal
mysql -uroot
if there’s a password, then add -p
punkhop
@punkhop
Feb 15 2016 18:33
I've gotta figure all that out too - I don't think they know the address/username/password
kaik84
@kaik84
Feb 15 2016 18:33
Oh dear.
Normally, the MySQL address is just localhost
or 127.0.0.1
port is 3306
If need be, and if you have permission, follow this tutorial: https://www.variphy.com/support/knowledge-base/mac-os-x-reset-mysql-root-password
punkhop
@punkhop
Feb 15 2016 18:34
tried mysql -uroot, command not found
guess I need homebrew?
kaik84
@kaik84
Feb 15 2016 18:34
Yes.
Install it, then do brew install mysql
punkhop
@punkhop
Feb 15 2016 18:35
I know I've already got mysql on here though, they've been using CA for months
kaik84
@kaik84
Feb 15 2016 18:35
I think your panel or machine is being weird; it says MySQL is running yet it can’t find MySQL commands?!
do echo $PATH
and put the result in this chat
punkhop
@punkhop
Feb 15 2016 18:36
/usr/local/bin:/usr/bin:/bin:usr/sbin:/sbin
kaik84
@kaik84
Feb 15 2016 18:37
Change your PATH to this: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
punkhop
@punkhop
Feb 15 2016 18:37
echo then that?
kaik84
@kaik84
Feb 15 2016 18:37
Also, do ls /usr/local/bin
No, go into your .bashrc or .bash_profile
punkhop
@punkhop
Feb 15 2016 18:38
Go into how? And where are those
kaik84
@kaik84
Feb 15 2016 18:38
then add the line export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
vi ~/.bash_profile
OR vi ~/.bashrc
punkhop
@punkhop
Feb 15 2016 18:39
Hold on, I think the user may have screwed this up worse than I thought
I can't connect to any site on Safari
Chrome crashes upon launch
kaik84
@kaik84
Feb 15 2016 18:40
Oh dear.
Is there anything important/sensitive on the machine?
punkhop
@punkhop
Feb 15 2016 18:40
I think just the CA database
punkhop
@punkhop
Feb 15 2016 18:40
A handful of folders I could backup on the desktop too
mysqldump command isn't found
kaik84
@kaik84
Feb 15 2016 18:41
You may need to get permission to re-install Mac OS X on the machine if it’s really messed up
Uh-oh.
Did you change your PATH?
punkhop
@punkhop
Feb 15 2016 18:41
Didn't change anything yet
kaik84
@kaik84
Feb 15 2016 18:42
The path was a bit messed up; there was a missing beginning slash for one of the parts
punkhop
@punkhop
Feb 15 2016 18:42
So I'm in usr local bin
kaik84
@kaik84
Feb 15 2016 18:42
Once you change it, do source ~/.bash_profile
then add the line export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
do that in your ~/.bash_profile
punkhop
@punkhop
Feb 15 2016 18:42
ok, trying to open that file now
kaik84
@kaik84
Feb 15 2016 18:43
Don’t add source ~/.bash_profile inside your actual .bash_profile though!
punkhop
@punkhop
Feb 15 2016 18:43
First I need to figure out how to open .bash_profile
kaik84
@kaik84
Feb 15 2016 18:43
vi ~/.bash_profile
punkhop
@punkhop
Feb 15 2016 18:44
ok
I've got
export PATH="$HOME/magemagick_path = /usr/local/bin:$PATH"
then a ton of empty ~s
then "~/bash_profile" 1L, 58C
kaik84
@kaik84
Feb 15 2016 18:45
that last line is normal
it’s for the editor, it’s not in the file
punkhop
@punkhop
Feb 15 2016 18:45
ok
kaik84
@kaik84
Feb 15 2016 18:45
same thing with the ~s
punkhop
@punkhop
Feb 15 2016 18:45
thought so
So this definitely happened when the user tried to do imagemagick
kaik84
@kaik84
Feb 15 2016 18:46
I’m giving you a modified PATH
You’ll need to re-add imagemagick to it
punkhop
@punkhop
Feb 15 2016 18:46
Haha
imagemagick is my last priority
kaik84
@kaik84
Feb 15 2016 18:46
export PATH=$HOME:/usr/local/bin:$PATH
punkhop
@punkhop
Feb 15 2016 18:46
I haven't a clue how to install that, I'll have to deal with that once I get CA working again
kaik84
@kaik84
Feb 15 2016 18:47
Usually $HOME isn’t needed in the path though
punkhop
@punkhop
Feb 15 2016 18:47
I can't edit the Path....
or edit this doc in any way right now
kaik84
@kaik84
Feb 15 2016 18:47
sudo vi ~/.bash_profile
you have to run it that way
sorry, I didn’t mention that
Also, press I
to edit
punkhop
@punkhop
Feb 15 2016 18:47
trying to exit out of this locked version
control c didn't do it
kaik84
@kaik84
Feb 15 2016 18:47
shift + double Z
so shift, then press Z twice quickly
punkhop
@punkhop
Feb 15 2016 18:48
oy, ok
Tried opening it with sudo vi and it found a sqap file because it's still open
kaik84
@kaik84
Feb 15 2016 18:49
Select the “delete swap” option
or whatever they call it
punkhop
@punkhop
Feb 15 2016 18:49
ok, got that
kaik84
@kaik84
Feb 15 2016 18:49
okay
punkhop
@punkhop
Feb 15 2016 18:49
gonna try to put your path in
kaik84
@kaik84
Feb 15 2016 18:50
Once you’re done and out of the file, remember to do source ~/.bash_profile
punkhop
@punkhop
Feb 15 2016 18:50
How do I save the file?
I put the path in there
kaik84
@kaik84
Feb 15 2016 18:50
Press shift, then press Z twice
punkhop
@punkhop
Feb 15 2016 18:50
Thats just giving me capital Zs
kaik84
@kaik84
Feb 15 2016 18:51
Hold down shift
punkhop
@punkhop
Feb 15 2016 18:51
I'm in INSERT mode
kaik84
@kaik84
Feb 15 2016 18:51
Press escape
punkhop
@punkhop
Feb 15 2016 18:51
got it
ok
gonna do source
kaik84
@kaik84
Feb 15 2016 18:51
Once you’re done and out of the file, remember to do source ~/.bash_profile
alright
punkhop
@punkhop
Feb 15 2016 18:51
ok, ran source
it ran, no response
kaik84
@kaik84
Feb 15 2016 18:52
That’s normal
punkhop
@punkhop
Feb 15 2016 18:52
whew
kaik84
@kaik84
Feb 15 2016 18:52
Try to run mysql now
or mysqld
or any mysql command
punkhop
@punkhop
Feb 15 2016 18:52
Commands not found.
kaik84
@kaik84
Feb 15 2016 18:52
Uh-oh!
Run echo $PATH again
What does it return?
punkhop
@punkhop
Feb 15 2016 18:53
/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
kaik84
@kaik84
Feb 15 2016 18:53
ls /usr/local/bin/
punkhop
@punkhop
Feb 15 2016 18:53
ok
kaik84
@kaik84
Feb 15 2016 18:54
Do you see “mysql” or “mysqld” in the output?
punkhop
@punkhop
Feb 15 2016 18:54
nope
kaik84
@kaik84
Feb 15 2016 18:54
Install Homebrew, then do brew install mysql
That’ll install it to the right directories
punkhop
@punkhop
Feb 15 2016 18:54
How do I install homebrew from terminal?
I can't load websites, I have no idea why
don’t feel bad if you can’t get it to work though
it’s not easy when you do it the first time around
then you gradually get better
also, more people will be on a bit later :)
punkhop
@punkhop
Feb 15 2016 18:57
wow, ok
so I put that command from you in a text doc
put it on a USB stick
and put it on the Mac with CA
so I could copy and paste it
textedit crashes on launch too.
kaik84
@kaik84
Feb 15 2016 18:58
I think your machine has, uh, bigger problems
If TextEdit is crashing, obviously something is wrong
punkhop
@punkhop
Feb 15 2016 18:58
I think so too.
I'm thinking I need to establish a remote support thing with CA
So I can safely back this thing up, wipe the Mac, reinstall OS X, and have it properly installed
kaik84
@kaik84
Feb 15 2016 18:59
Yes.
Emphasis on the backup
punkhop
@punkhop
Feb 15 2016 18:59
right.
How do I go about starting that support?
kaik84
@kaik84
Feb 15 2016 18:59
Do you have a Time Capsule or hard drive or whatever?
punkhop
@punkhop
Feb 15 2016 18:59
Lemme ask the front desk girl
kaik84
@kaik84
Feb 15 2016 18:59
okay!
You may need to do two backups: one for your personal computer (assuming you’re on one), and one for the actual CA machine
That way they’re both covered in case you need to re-install Mac OS X
punkhop
@punkhop
Feb 15 2016 19:07
Right
I found a drive and am doing a time machine backup now
kaik84
@kaik84
Feb 15 2016 19:08
Alright
Just a reminder, you might need to back up both machines!
punkhop
@punkhop
Feb 15 2016 19:08
Both?
kaik84
@kaik84
Feb 15 2016 19:08
Sounds like they’re both a bit messed up, unfortunately
Wait
punkhop
@punkhop
Feb 15 2016 19:08
This is all on one iMac
kaik84
@kaik84
Feb 15 2016 19:09
Oh.
Nevermind
punkhop
@punkhop
Feb 15 2016 19:09
I'm a for-hire IT guy on my MacBook Air
just here for a few hours
kaik84
@kaik84
Feb 15 2016 19:09
oh okay
Just got a bit confused!
yeah, back up the iMac
no need to touch your laptop backup-wise
punkhop
@punkhop
Feb 15 2016 19:11
right.
kaik84
@kaik84
Feb 15 2016 19:11
Sometimes I get a bit confused, sorry =)
punkhop
@punkhop
Feb 15 2016 19:11
No worries. I know it's tough over chat.
Do you know how I start a remote support setup with CA?
kaik84
@kaik84
Feb 15 2016 19:12
I don’t know personally. Let me ask.
You need to give a description of who you’re working with, and what they actually need in terms of support
punkhop
@punkhop
Feb 15 2016 19:15
Is there a pricing list for remote support time?
kaik84
@kaik84
Feb 15 2016 19:16
Just write to that address and you can get a quote
There’s no official pricing list
because they need to determine the cost based on what is needed and how much time is needed
punkhop
@punkhop
Feb 15 2016 19:17
Ah, ok
Oh
Thanks so much for your help
Where is the CA database stored?
I want to double-check that I'm backing it up
kaik84
@kaik84
Feb 15 2016 19:20
Does your MySQL panel have a dump function?
Try to make a dump of the CA database
then copy that into your documents directory or wherever you prefer
If you have to do it on the iMac, just email it to the email address you use on your MacBook Air
punkhop
@punkhop
Feb 15 2016 19:22
I can't access it any other way, from what I can tell
kaik84
@kaik84
Feb 15 2016 19:22
Are you able to access it via the panel though?
You said you had one
punkhop
@punkhop
Feb 15 2016 19:23
I spose I'll have the CA team check that it's backed up if/when they remote
kaik84
@kaik84
Feb 15 2016 19:24
The remote thing might take a while; they would have to talk to the people that you’re working with, get permission, and do whatever else needs to be done before they can go in
do you have a MySQL panel?
punkhop
@punkhop
Feb 15 2016 19:30
I've got a control panel
And it says mysql is running
kaik84
@kaik84
Feb 15 2016 19:30
Alright
Can you download a database?
What software is the panel running?
phpMyAdmin?
punkhop
@punkhop
Feb 15 2016 19:31
It's just a start/stop system preference control panel for OS X
kaik84
@kaik84
Feb 15 2016 19:31
Oh.
punkhop
@punkhop
Feb 15 2016 19:31
Stop server, start server, start on mac startup.
kaik84
@kaik84
Feb 15 2016 19:31
That’s not going to help
Is there really important data in the CA database?
or is it stuff that can be added back relatively quickly
punkhop
@punkhop
Feb 15 2016 19:31
Yeah, months of work
kaik84
@kaik84
Feb 15 2016 19:31
Darn.
so basically: no MySQL commands work, you don’t have an actual panel, and the machine is messed up?
go to the terminal on the machine with CA
type in “mysql”, DON’T press enter, then press tab
that’ll show any commands that match “mysql"
punkhop
@punkhop
Feb 15 2016 19:35
hitting tab just flashes gray
kaik84
@kaik84
Feb 15 2016 19:35
alright, that means there aren’t any matches
punkhop
@punkhop
Feb 15 2016 19:35
Right.
kaik84
@kaik84
Feb 15 2016 19:36
Can you try to install Homebrew again?
punkhop
@punkhop
Feb 15 2016 19:36
sure
I just have to type out that command by hand
gimme a sec
Already installed.
kaik84
@kaik84
Feb 15 2016 19:38
Alright.
Run brew install mysql
It’ll override the Apple one, but don’t worry
it works perfectly fine
punkhop
@punkhop
Feb 15 2016 19:38
as long as I'm not overwriting the CA database...
kaik84
@kaik84
Feb 15 2016 19:38
Actually, wait
If you do by accident, I’m terribly sorry.
punkhop
@punkhop
Feb 15 2016 19:39
I'm not going to take any other steps.
At least until I have a backup.
kaik84
@kaik84
Feb 15 2016 19:40
That’s perfectly reasonable
punkhop
@punkhop
Feb 15 2016 19:40
I'll send CA an email now
Thanks so much
kaik84
@kaik84
Feb 15 2016 19:41
Check this
It should help you figure out a way to back the stuff up
punkhop
@punkhop
Feb 15 2016 19:50
great thanks